Hi, i need some help with this onjoin tcl. I want to have two files, one with HOSTMASKS of the ppl that will be msged like this:
Code: Select all
---hosts.txt---
*@*.anything.br
*@*.something.tw
*ident@229.9.89.*
clone*!*@*
etc.
------ . ------
and one with list of NICKS that WONT be msged like this:
Code: Select all
---nicks.txt---
Nick1
Nick2
Nick3
etc.
------ . ------
Here is the code of the tcl i wanna update:
Code: Select all
set chnnl "#chan"
set ntwrk "NetworkNet"
set passwd "s0me_pass"
bind join - "$chnnl *" msg:join
proc msg:join {nick uhost handle channel msg} {
if {[strlwr $nick] != [strlwr $::botnick] } {
puthelp "PRIVMSG $nick :Hey $nick, you have unallowed ip, unwelcomed on $ntwrk, please part $chnnl or type '/msg $::botnick ALLOWED <password>' to stop being msged"
}
}
So, this tcl should check the hosts.txt file and if in finds the hostmask, it should pm user with the text from the code. If they type 'ALLOWED s0me_pass" the bot should add their nick to te nicks.txt file and wont msg them anymore. Im a tcl n00b, especialy in managing files and help would be very appreciated. If its not too much from me to aks, a system that will check if the nick who joined gets @ by chanserv on $chnnl and automaticly add that nick to nicks.txt would be great, cause operators should be allowed to stay on $chnnl without any pm to leave.
tnx in advance,
all the best,
Mike