Mode bitch

By fiftek on Jan 21, 2006

If nick change mode on chan where bot is oped, bot kick him and changes mode back to previous!

on *:MODE:#: {
  if ($me !isop $chan) { halt }
  if ($nick == $me) { halt }
  if ( $level($address($nick,1)) == master) { halt }
  kick $chan $nick dont change modes
  mode # $replace($1,-,.,+,:,.,+,:,-) $2-
}

works like that:
[20:07:16] * Cascada` sets mode: +m
[20:07:16] * Cascada` was kicked by Plidna (dont change modes)
[20:07:16] * Plidna sets mode: -m

Comments

Sign in to comment.
frishy   -  Oct 24, 2008

do note that $replacex($1-,+,-,-,+) and $+($iif($left($1,1) == -,+,-),$right($1,-1)) can be abused

$replacex($1-,+,-,-,+)
frish sets mode +m-m
script sets mode -m+m

$+($iif($left($1,1) == -,+,-),$right($1,-1))
frish sets mode +m-m+m
script sets mode -m-m+m

just saying

 Respond  
Kardadantis   -  Oct 19, 2008

fnx napa182 :) I connect it like thise:

on *:MODE:#: {
if ($me !isop $chan) { halt }
if ($nick == $me) { halt }
if ( $level($address($nick,1)) == master) { halt }
kick $chan $nick 4,1 dont change $chan modes!
mode # $+($iif($left($1,1) == -,+,-),$right($1,-1))
}

It worcks prefectly :)

 Respond  
napa182   -  Oct 19, 2008

you could do somthing like this just replace the #chan1 and so on with the channels you want it to work in and also chage BotOwnersNick to what ever nick you want to be able to change modes.

also you can just set mode lock on instead of useing this.

on !@*:MODE:#: { 
  if ($istok(#chan1 #chan2,$chan,32) && !$istok(ChanServ BotOwnersNick,$nick,32)) { 
    kick $chan $nick dont change modes 
    mode # $+($iif($left($1,1) == -,+,-),$right($1,-1)) 
  } 
}
 Respond  
Kardadantis   -  Oct 19, 2008

Hi, how i need to modify ($1-,+,-,-,+) or ($1,-,.,+,:,.,+,:,-) to protect entrU modes? And one more thing, my bot have excess flood trying to change modes on join channel there nrt modes is auto locked.

 Respond  
chicknh8r   -  Jan 22, 2006

I use $replacex($1-,+,-,-,+)

 Respond  
RoninWarrior   -  Jan 21, 2006

it is used for mode protection for channels it has been asked for many times nice code.

 Respond  
nobody   -  Jan 21, 2006

I don\'t see the point in kicking the user.

 Respond  
Bankotsu   -  Jan 21, 2006

What the hell is the point in this? It is a useless code.

 Respond  
xtr   -  Jan 21, 2006

? ok

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.