It's a simple script for a bot, it goes well if your bot has autojoin on invite and you want it to be a "shared" bot, all you say is !sayrooms and it says the channels it's in, if it's op, halfop, or voice there(I wasn't able to make it able for the advanced powers like ~ and &) it's been known not to say all the channels if it lags, and it also works in PMs, it uses notices, so if you have some sort of notice flood protection on, this'll likely set it off, so think about it, this script goes especially well for those who rent a shell for their bot and can't open their bot's window to see the rooms it's in, this is my first snippet =/
on *:TEXT:*!Sayrooms*:*:(
if ($chan(0) == 1) { /notice $nick I am in $+ $chan(0) $+ channel }
else { /notice $nick 0I am in $+ $chan(0) $+ channels }
/notice $nick 0They are:
set %x 0
:next
inc %x
set %chans $chan(%x)
if (%chans == $null) { goto end }
elseif ($me isop %chans) { /notice $nick 12@ $+ %chans | goto next }
elseif ($me isop %chans) && ($me isvoice %chans) { /notice $nick 12@3+ $+ %chans | goto next }
elseif ($me isop %chans) && ($me isvoice %chans) && ($isuser($me,%chans)) { /notice $nick 12@3+10- $+ %chans | goto next }
elseif ($me isop %chans) && ($isuser($me,%chans)) { /notice $nick 12@10- $+ %chans | goto next }
elseif ($me ishop %chans) { /notice $nick 7% $+ %chans | goto next }
elseif ($me ishop %chans) && ($me isvoice %chans) { /notice $nick 7%3+ $+ %chans | goto next }
elseif ($me isvoice %chans) { /notice $nick 9+ $+ %chans | goto next }
elseif ($me isvoice %chans) && ($isuser($me,$chans)) { /notice $nick 9+10- $+ %chans | goto next }
elseif ($isuser($me,%chans)) { /notice $nick 010- $+ %chans | goto next }
else { /notice 0$nick %chans | goto next }
:end
halt
}
also you have !Sayrooms as a wildcard also you had a ( mixed up for a {
on *:TEXT:!Sayrooms:*:{
if ($chan(0) == 1) {
/notice $nick I am in $+ $chan(0) $+ channel
}
else { /notice $nick 0I am in $+ $chan(0) $+ channels
/notice $nick 0They are:
set %x 0
:next
inc %x
set %chans $chan(%x)
if (%chans == $null) { goto end }
elseif ($me isop %chans) { /notice $nick 12@ $+ %chans | goto next }
elseif ($me isop %chans) && ($me isvoice %chans) { /notice $nick 12@3+ $+ %chans | goto next }
elseif ($me isop %chans) && ($me isvoice %chans) && ($isuser($me,%chans)) { /notice $nick 12@3+10- $+ %chans | goto next }
elseif ($me isop %chans) && ($isuser($me,%chans)) { /notice $nick 12@10- $+ %chans | goto next }
elseif ($me ishop %chans) { /notice $nick 7% $+ %chans | goto next }
elseif ($me ishop %chans) && ($me isvoice %chans) { /notice $nick 7%3+ $+ %chans | goto next }
elseif ($me isvoice %chans) { /notice $nick 9+ $+ %chans | goto next }
elseif ($me isvoice %chans) && ($isuser($me,$chans)) { /notice $nick 9+10- $+ %chans | goto next }
elseif ($isuser($me,%chans)) { /notice $nick 010- $+ %chans | goto next }
else { /notice 0$nick %chans | goto next }
:end
halt
}
}