mIRC Homepage
Posted By: ShadowWlf ON TXT script - 30/09/07 03:13 AM
I had to reformat and lost all my info

the one script I had would watch for certain strings (ie nick word word word) and if anyone said them would msg a bot to kick ban them.

Thanks for anyones help on this smile
Posted By: Mpot Re: ON TXT script - 30/09/07 03:15 AM
Are you trying to say that there's a certain nickname that can't say words? Or no-one can say the words? Perhaps something like:

Code:
on *:TEXT:*:#: {
if ($1 isin badword badword badword badword { /kick $chan $nick optionalkickreasonhere


I don't know if that's valid or not, but I think it's a pretty good shot.
Posted By: ShadowWlf Re: ON TXT script - 30/09/07 03:19 AM
there's one on the network I'm on in the chan I'm on that spouts the same lines and flood the channel over and over-mainly wantign it to catch the key words in his spouting and have it trigger to ban through Unets X
Posted By: Mpot Re: ON TXT script - 30/09/07 03:23 AM
In that case(again, hoping on the validity):

Code:
on *:TEXT:*:#: {
if ($nick == shitlistednickname && $1 isin badword badword badword badword) { /msg nickname message }
Posted By: ShadowWlf Re: ON TXT script - 30/09/07 03:25 AM
that is close but the one uses proxies and changes nicks so has to be global for the nick and host frown

makes it a pain
Posted By: Mpot Re: ON TXT script - 30/09/07 03:27 AM
Er, how do you expect to track a single guy if he changes nicknames and hostmasks? The only way you can is to do a blanket ban on those certain words for any nickname.

Code:
on *:TEXT:*:#: {
if ($nick == $1 isin badword badword badword badword) { /msg nickname message }
}
Posted By: ShadowWlf Re: ON TXT script - 30/09/07 03:28 AM
that looks like what was wanting for a temp solution since this ass is so persistant

Thanks


but not quite-if is in one chan and says the "badwords"

editedagain

nm I got it I THINK
Posted By: Mpot Re: ON TXT script - 30/09/07 03:30 AM
Er, wait, I botched that up a bit. Corrected:

Code:
on *:TEXT:*:#: {
if ($1 isin badword badword badword badword) { /msg nickname message }
}


Again, let me emphasize that this SHOULD work, but I'm not quite that confident in my abilities. Tell me how it goes!
Posted By: Mpot Re: ON TXT script - 30/09/07 03:39 AM
Oh, you only want it for one channel?

Quote:
on *:TEXT:*:#: {
if ($nick == $1 isin badword badword badword badword) { /msg nickname message }
}


Quote:
on *:TEXT:*:#yourchannelhere: {
if ($nick == $1 isin badword badword badword badword) { /msg nickname message }
}


Anyone care to tell me if I completely frakked this? Deegee, Riamus?
Posted By: ShadowWlf Re: ON TXT script - 30/09/07 03:52 AM
the nickname to be msging is X on Unet I think got it but chans dead so can't verify it yet frown loading another client to test even if I get myself caught in th eban on my own host lol
Posted By: Mpot Re: ON TXT script - 30/09/07 03:55 AM
Quote:
on *:TEXT:*:#yourchannelhere: {
if ($nick == $1 isin badword badword badword badword) { /msg X commands }
}


Posted By: deegee Re: ON TXT script - 30/09/07 04:04 AM
Are you looking for something like your post here?
Posted By: Mpot Re: ON TXT script - 30/09/07 04:08 AM
Originally Posted By: deegee
Are you looking for something like your post here?


Awww, nuts. I made that for nothing? XD
Posted By: ShadowWlf Re: ON TXT script - 30/09/07 04:18 AM
no not that one-though I'm still working on that

but something that when someone in one chan says 2 or 3 certain words in (one sentence) one chan it'll trigger it and set a 1hr ban on that nick/host
Posted By: deegee Re: ON TXT script - 30/09/07 04:22 AM
You could try this script
Posted By: Mpot Re: ON TXT script - 30/09/07 04:25 AM
Code:
on *:TEXT:*:#channel:{
if (badword badword iswm $1-) { /ban -ku3600 $nick 5 }
} 


EDIT: Maybe isin would work better than iswm? And use || for OR to separate the words?
Posted By: Mpot Re: ON TXT script - 30/09/07 04:41 AM
I think this is perfect:

Code:
on *:TEXT:*:#channel:{
  if (fuck || shit || damn || bitch isin $1-) { /ban -kzu3600 $chan $nick 5 }
} 


Will ban them for an hour if fuck OR shit OR damn OR bitch are in what they say.

Anyhow, I'm off to bed for the night.
Posted By: Bekar Re: ON TXT script - 30/09/07 06:12 AM
Bad format for the if.
Posted By: deegee Re: ON TXT script - 30/09/07 01:32 PM
Originally Posted By: Mpot

Will ban them for an hour if * OR * OR damn OR bitch are in what they say.


Actually it wil ban everyone who posts anything crazy
This is how its interpreted...
Code:
  if (string) { ban -kzu3600 $chan $nick 5 }
  elseif (string) { ban -kzu3600 $chan $nick 5 }
  elseif (string) { ban -kzu3600 $chan $nick 5 }
  elseif (word isin $1-) { ban -kzu3600 $chan $nick 5 }

...the first 3 are always true, because they are just strings, not comparisons or something that can return a non $false/NULL/0 value. The script will never even get to the first elseif.
Try it from an editbox, //if (word1 || word2 || word3 || word4 isin $1-) { echo -ag whoops! }

Also, there isn't a -z switch for /ban
/ban [-kruN] [#channel] <nickname|address> [type]
Posted By: Mpot Re: ON TXT script - 30/09/07 04:12 PM
Er, then how would I do it properly?
© mIRC Discussion Forums