mIRC Home    About    Download    Register    News    Help

Print Thread
S
sas22
sas22
S
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?

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.

S
sas22
sas22
S
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

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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>)

S
sas22
sas22
S
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.

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
OK..then I need to know what, if any, error message(s) came up when you tried the code.

S
sas22
sas22
S
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

T
truguce
truguce
T
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.

S
schaefer31
schaefer31
S
If you are running the script from your instance of mIRC, you can't trigger it yourself. Someone else has to.

S
sas22
sas22
S
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..

S
sas22
sas22
S
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

S
sas22
sas22
S
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..

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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)


Link Copied to Clipboard