mIRC Home    About    Download    Register    News    Help

Print Thread
on op ban help #154071 26/07/06 09:03 PM
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
how can i make this better for when im opped

Code:
on *:OP:#: { 
  mode #f +b  81.101.141.64
  mode #w +b  81.101.141.64
  mode #l +b  81.101.141.64

}



thanks

Last edited by state; 26/07/06 09:04 PM.
Re: on op ban help #154072 26/07/06 11:24 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Define what "betterness" you would like to have?

Re: on op ban help #154073 27/07/06 01:32 PM
Joined: Dec 2005
Posts: 58
S
SCNDRL Offline
Babel fish
Offline
Babel fish
S
Joined: Dec 2005
Posts: 58
replace
on *:OP:#: {
with
on me:OP:#: {


i like that
Re: on op ban help #154074 27/07/06 04:58 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Quote:
how can i make this better for when im opped

Code:
on *:OP:#: { 
  mode #f +b  81.101.141.64
  mode #w +b  81.101.141.64
  mode #l +b  81.101.141.64

}



thanks


considering you want to do a multi ban in different channels you might want to consider if statements... else youll keep getting the "Your not op in this channel" message

Code:
on ME:OP:#:{
  if $me isop #f { mode #f +b 81.101.141.64 } 
  if $me isop #w { mode #w +b 81.101.141.64 }
  if $me isop #l { mode #l +b 81.101.141.64 }
}


Why did I use all those if statements? well basically the script won't work if your not op on that specific chan now theres various ways you can go about it like a IF, Elseif and a Else but this routine is basic


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: on op ban help #154075 29/07/06 09:53 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on *:op:#f:{
  if ($opnick == $me) mode $chan +b 81.101.141.64
}
on *:op:#w:{
  if ($opnick == $me) mode $chan +b 81.101.141.64
}
on *:op:#l:{
  if ($opnick == $me) mode $chan +b 81.101.141.64
}

Re: on op ban help #154076 29/07/06 10:34 PM
Joined: Feb 2004
Posts: 206
D
Darwin_Koala Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
Perhaps even ......

Code:
 
on me:op:#f,#w,#l:{  
mode $chan +b 81.101.141.64
}
 


or

Code:
 
on me:op:#f:{  
Ban64 $chan
}
on me:op:#w:{  
Ban64 $chan
}
on me:op:#l:{  
Ban64 $chan
}

alias -l Ban64 mode $1 +b 81.101.141.64
 


However, depending on what the OP actually wanted, this may also work (in which case the alternative channels need to be checked to see if the OP is also opped in the other channels.:

Code:
 
on me:op:#f,#w,#l:{  
 if ($me isop #f) Ban64 #f 
 if ($me isop #w) Ban64 #w
 if ($me isop #l) Ban64 #l 
}
 alias -l Ban64 mode $1 +b 81.101.141.64



or even ....

Code:
 
on me:op:#f,#w,#l:{  
Ban64 #f 
Ban64 #w
Ban64 #l 
}
 alias -l Ban64 if ($me isop $1) mode $1 +b 81.101.141.64



All of these options reduce the amount of editing required if the IP changes, which reduces the likelihood of errors! May not seem like much when it is altogether like this, but as a script grows, it may become more important!


*untested

Cheers,

DK

*Edited to use "me" instead of "*" in the "ON"
*edited to include an additional option

Last edited by Darwin_Koala; 29/07/06 10:47 PM.