mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Hello i have been trying to make a small script that will auto add +R or -R if ChanServ leaves or returns online, i'm assuming it would have to be somesort of on NOTIFY command to activate and deactive it, plus i would only would want to do this in a certain channel too.

Joined: Oct 2003
Posts: 53
W
Babel fish
Offline
Babel fish
W
Joined: Oct 2003
Posts: 53
This will set mode R if someone, including server, removes it
and it will check for mode R when you join the channel and
set it if it's not already set.
Code:
on me:*:JOIN:#channel:.timer 1 1 checkmode #channel
on !*:MODE:#channel:.timer 1 1 checkmode #channel
on *:SERVERMODE:#channel:.timer 1 1 checkmode #channel
alias checkmode if (R !isincs $gettok($chan($1).mode,1,32)) mode $1 +R

#channel == your own channel name of course

Last edited by WhoJoeDaddy; 21/10/03 05:52 PM.
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Thanks i will save them for future use, but was looking for something that if Chanserv went offline i would auto remove R from the room so it will give people a chance to enter the room, and when Chanserv comes back i would +R

Joined: Oct 2003
Posts: 53
W
Babel fish
Offline
Babel fish
W
Joined: Oct 2003
Posts: 53
sorry .. misunderstood
Code:
on *:UNOTIFY: {
  if ($me !isop [color:red]#channel[/color]) return
  if (($nick == ChanServ) && (R isincs $gettok($chan([color:red]#channel[/color]).mode,1,32))) mode [color:red]#channel[/color] -R
}
on *:NOTIFY: {
  if ($me !isop [color:red]#channel[/color]) return
  if (($nick == ChanServ) && (R !isincs $gettok($chan([color:red]#channel[/color]).mode,1,32))) mode [color:red]#channel[/color] +R
}

replace #channel with your own channel name and just add ChanServ to your notify list.

Last edited by WhoJoeDaddy; 21/10/03 08:14 PM.

Link Copied to Clipboard