ignoreAll with exceptions

All resolved question will be found here. It is recommended that you browse / search through this section first and see if your question has been answered before

Moderators: Moderators, Documentation Writers

User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

ignoreAll with exceptions

#1 Post by SkylorD »

Hello : Good-day,Good-morning,Good-night.

How ignoreAll and add any exceptions ?
Yes yes...Exceptions 8D
I tried edit sub cmdIgnore but,don't works.

Why,when i write "ignore 1 all" and after "ignore 0 mirana" doesn't work ?

Have as edit to do this ?
sub cmdIgnore {
if (!$net || $net->getState() != Network::IN_GAME) {
error TF("You must be logged in the game to use this command (%s)\n", shift);
return;
}
my (undef, $args) = @_;
my ($arg1, $arg2) = $args =~ /^(\d+) ([\s\S]*)/;
if ($arg1 eq "" || $arg2 eq "" || ($arg1 ne "0" && $arg1 ne "1")) {
error T("Syntax Error in function 'ignore' (Ignore Player/Everyone)\n" .
"Usage: ignore <flag> <name | all>\n");
} else {
if ($arg2 eq "all") {
$messageSender->sendIgnoreAll(!$arg1);
} else {
$messageSender->sendIgnore($arg2, !$arg1);
}
}
}
This code was made to "ignore All" and to "UNignore All" and not to : "ignore All" and "UNignore Player".

;)

Ops,i have a new idea.
Add other else?

Other : I not understand the "exclamation" ! in this code.
I know your function.
But,in this code,is very confused.
Learn rules
Uzah
Human
Human
Posts: 25
Joined: 04 Jun 2011, 18:29
Noob?: Yes
Location: pRO Payon

Re: ignoreAll with exceptions

#2 Post by Uzah »

IMO the one you are trying to aim is impossible. ignoreALL 1 is equivalent to /exall command in game; thus, you can't make any exemption to it similar to when you're actually playing the game.
What have you done so far?
User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

Re: ignoreAll with exceptions

#3 Post by SkylorD »

:(

The plugin Spam Blocker can be a good option.
I will try.

Thanks for resp.
I will continue trying.
Learn rules
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: ignoreAll with exceptions

#4 Post by EternalHarvest »

SkylorD wrote:The plugin Spam Blocker can be a good option
With chatDomains plugins you can block chat lines matching configurable regexp.
User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

Re: ignoreAll with exceptions

#5 Post by SkylorD »

Nice Plugin.
Thanks :)
Learn rules