mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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>)

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
OK..then I need to know what, if any, error message(s) came up when you tried the code.

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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

Joined: Oct 2005
Posts: 91
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
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.

Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
If you are running the script from your instance of mIRC, you can't trigger it yourself. Someone else has to.

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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..

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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