mIRC Homepage
Posted By: sas22 Ban someone for an invalid text - 22/06/06 12:17 AM
Ok some my chan has triggers beginning with ! and these triggers are:
!triggers !rules !ddl !list !voiceme !site !peak
people misuse them and add !...(which is not one of our triggers)
How do I ban them for using ! if its not one of our triggers?
Posted By: RusselB Re: Ban someone for an invalid text - 22/06/06 01:07 AM
Code:
on @*:text:!*:#:{
if !$istok(!triggers !rules !ddl !list !voiceme !site !peak,$1,32) {
.ban -k $chan $nick Invalid trigger
}
}
 


If there are more triggers than you specified in your post, just add them to the list in the $istok ensuring that each trigger is separated by a space. If you have a lot of triggers that haven't been mentioned, then you might run into difficulties with the line length.
Posted By: sas22 Re: Ban someone for an invalid text - 22/06/06 01:17 AM
Quote:
Code:
on @*:text:!*:#:{
if !$istok(!triggers !rules !ddl !list !voiceme !site !peak,$1,32) {
.ban -k $chan $nick Invalid trigger
}
}
 


If there are more triggers than you specified in your post, just add them to the list in the $istok ensuring that each trigger is separated by a space. If you have a lot of triggers that haven't been mentioned, then you might run into difficulties with the line length.
It didnt work
Posted By: RusselB Re: Ban someone for an invalid text - 22/06/06 02:45 AM
Ensure that the person/bot that has the script has full ops. The @ in the ON TEXT event means that the code won't work unless the person/bot that has the code has full ops. (/mode <channel> +o <nick>)
Posted By: sas22 Re: Ban someone for an invalid text - 22/06/06 02:57 AM
Quote:
Ensure that the person/bot that has the script has full ops. The @ in the ON TEXT event means that the code won't work unless the person/bot that has the code has full ops. (/mode <channel> +o <nick>)
Lol I know that.
Posted By: RusselB Re: Ban someone for an invalid text - 22/06/06 03:01 AM
OK..then I need to know what, if any, error message(s) came up when you tried the code.
Posted By: sas22 Re: Ban someone for an invalid text - 22/06/06 03:21 AM
Well I tested out the script..and nothing happend Like when msg the chan some false ! triggers that were not in the list nothing happend
Posted By: truguce Re: Ban someone for an invalid text - 22/06/06 03:56 AM
I tested it just as RusselB wrote it and it works just fine.
Quote:
- you were banned from [#truguce] by [truguce]
[20:53] * You were kicked by truguce (Invalid trigger)

You might want to check and see if there is another script conflicting with this one.
Posted By: schaefer31 Re: Ban someone for an invalid text - 22/06/06 04:13 AM
If you are running the script from your instance of mIRC, you can't trigger it yourself. Someone else has to.
Posted By: sas22 Re: Ban someone for an invalid text - 22/06/06 04:14 AM
Quote:
If you are running the script from your instance of mIRC, you can't trigger it yourself. Someone else has to.
Yes I have a clone doing the testing..
Posted By: sas22 Re: Ban someone for an invalid text - 22/06/06 04:17 AM
Quote:
I tested it just as RusselB wrote it and it works just fine.
Quote:
- you were banned from [#truguce] by [truguce]
[20:53] * You were kicked by truguce (Invalid trigger)

You might want to check and see if there is another script conflicting with this one.
Yeah there was thanks everyone
Posted By: sas22 Re: Ban someone for an invalid text - 22/06/06 04:48 AM
Quote:
OK..then I need to know what, if any, error message(s) came up when you tried the code.
Would it be possible to add a * wilcard in the Delimiter section..like

on *:text:!*:#:{
if !$istok(%cmd,*,32) {
.ban -k $chan $nick Invalid trigger
}
}

So that if anyone where to use it..
Posted By: RusselB Re: Ban someone for an invalid text - 22/06/06 07:05 AM
Not as you're specifying it. The list of valid commands could be stored in a variable (as you show), however, you can't have a wildcard as the token match...While it doesn't have to be $1, in your case that is what I would suggest, since you're wanting to check the triggering command (which is located in $1)
© mIRC Discussion Forums