Now i know this can be done a million ways. Using .txt files or ini's or hash tables but i chose to use .txt files. Basically i made this because i use both chatspace servers and ircd and it was pissing me off that i couldn't get a reliable way to check for each because some commands on chatspace do different things than on ircd simple command would be .mode # +q. On chatspace it gives the person quiet status so they can't talk in a channel but on ircd it gives them owner. so i came up with this little snippet All you need to do is make yourself your snippet that needs to check between the two diff types of servers and use the cs checker alias in it i will post an example of such being used.
on *:connect:{
.enable #chatspacecheck
.version
}
#chatspacecheck on
raw 351 :*: {
if (CS isin $1- ) && ($server != $read(cscheck.txt,w,$server)) {
write cscheck.txt $server
.disable #chatspacecheck
}
elseif (CS !isin $1- ) {
.disable #chatspacecheck
}
}
#chatspacecheck end
alias cschecker {
if ($server == $read(cscheck.txt,w,$server)) {
return $true
}
else { return $false
}
}
be weary. b/c 'q' in channel modes can be both for 'quiet' or for 'admin'
Hence the 2nd check to make sure q is a mode that will effect a nick's power in the channel.
I updated it, atleast the name, and removed a check to make it more clear. Basically I check if q changes the nick's control level, and if so return $true. so:
if ($qIsAdminMode) {
;this will make $1 a channel admin:
mode # +q $1
}
else {
;this will 'quiet' $1
mode # +q $address($1,2)
}