mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2014
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2014
Posts: 6
Hi i am new to scripting, i am trying to make a script that sets the channel mode to +m through a timer when a user leaves the channel with a spam message with "http"in their /part message, i think i got the first part right but i am stuck in the set mode chanel part here is the script:

;//this is when the script checks for the part message containing the word http.
on @*:PART:#:{
IF ( e isin $strip($1-)) {
:// this is the part that works
mode +m -u300 $chan #
}
}
i am stuck in the second 'set mode' part confused
the command i am using now is not working.
Any suggestions or help is appreciated. grin






Joined: Nov 2014
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Nov 2014
Posts: 149
To control spam in part, you only have to put +u mode in your channel.
This prevents custom messages are displayed on the quit or part event.
But if you still want that code, study identifiers $regex and $regml, they allow you to more accurately detect URLs in messages. See this Wiki

Also, put the channel in moderate mode after a user part with spam, you may not be as convenient.
Because every time it happens this event, you'd be putting your channel moderate way, and thus mutes users who have no voice or arroba.
Think about it.

Last edited by JuanAm; 18/12/14 02:26 AM.
Joined: Dec 2014
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2014
Posts: 6
Unfortunately the server i am on does not support +u.
The Detecting part on that script works ok, just the set mode +m does not seem to work.

Last edited by partypills; 18/12/14 03:58 AM.
Joined: Feb 2011
Posts: 451
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 451
Code:
mode +m -u300 $chan #


What are you trying to do? make the channel +m for only 300 seconds?

Joined: Dec 2014
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2014
Posts: 6
300 sec or any other timing , i just want to +m the channel for a given time if somebody /part the channel with some message. There are some flooders ,spammers who join/part quickly with a part message i dont want to ban reach clone flooder but rather +m the channel for a short time after receiving the first /part message.Right now the script i use bans the ips
on @*:PART:#:{
IF ( e isin $strip($1-)) {
ban -u999960 # $nick 11
}
}
but i want to +m with a timer l after IF ( e isin $strip($1-)) is received

Joined: Nov 2014
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Nov 2014
Posts: 149
Do it with timer
Code:
mode $chan +m | .timermode 1 300 mode $chan -m 

Last edited by JuanAm; 18/12/14 05:24 AM.
Joined: Dec 2014
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2014
Posts: 6
I already solved it with a smiliar syntax like yours JuANaM,THANKS.

Joined: Nov 2014
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Nov 2014
Posts: 149
Try this:

Code:
on @*:PART:#:{
  if (http:// isin $strip($1-)) {
    ban -u60 # $nick No spam!
     mode $chan +m
     .timermode 1 300 mode $chan -m
  }
}



Last edited by JuanAm; 18/12/14 05:21 AM.
Joined: Nov 2014
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Nov 2014
Posts: 149
Originally Posted By: partypills
I already solved it with a smiliar syntax like yours JuANaM,THANKS.


OK smile

Also, you can add another condicional:

Code:
if (http:// isin $strip($1-)) || (www. isin $strip($1-)) {

Last edited by JuanAm; 18/12/14 05:33 AM.

Link Copied to Clipboard