mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2005
Posts: 25
E
enotsoc Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Aug 2005
Posts: 25
what i want to do is on a text script check for each of the following before it proceeds
on *:text:*:#:{
if the nick/s matches {
if the trigger word/s isin $1- {
if network/s match proceed {
if badword isin $1- { halt }

; each line will check the text file for matches if all is good then itll
scid -a if ($network == EFNet) { msg # $1-

i would like to use a text file to have it check so i can easily edit it in the future and have multipe words for each that can trigger it and or nicks
im not very good with scripting this one , been tring but had no real luck

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:text:*:#:{
if $read(badnicks.txt,s,$nick) { halt }
if $read(badnetwork.txt,s,$network) { halt }
var %a = 1
while %a <= $0 {
if $read(badword.txt,w,$+(*,$gettok($1-,%a,32),*)) { halt }
if $read(badtrigger.txt,w,$+(*,$gettok($1-,%a,32),*)) { halt }
inc %a
}
scid -a if ($network == EFNet) {
 msg # $1-
}
  


Contrary to your specific request, that will halt if any of the items match...if nothing matches, then the message is sent.
I'm not familiar with the /scid command, so I left that one alone

Keep 4 text files. Badnicks.txt, badnetwork.txt, badword.txt & badtrigger.txt

I usually find that there are fewer comparisons having to be done by looking for something that I don't want, than for something that I do.


Link Copied to Clipboard