mIRC Home    About    Download    Register    News    Help

Print Thread
#170157 03/02/07 09:54 PM
Joined: Jan 2007
Posts: 31
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2007
Posts: 31
Well iv been having problems with people coming into my channel under someones else nick. We try to take action by devoicing them and making them ID so chanvserv can revoice.

Heres what I plan on doing and wonder if it possible.
1. I wana make a script that looks for a certain part of a $nick. For instance if the nick is "[8_boo_8]" i want my script to look for the "[8_" part of the nick and take action.
Examples..
Script should take action is nick is like...
[8_boo_322]
[8_sddsdsd
etc..

I was wondering if a on join command is the best for this? Here is what I have so far.

Code:
on *:join:#: {
 if ($nick == *[8_* || *[[8_* ) {
mode $chan -v $nick
mode $chan +m
.notice $nick Please ID to receive a voice!
msg $chan $nick has be devoiced due to suspicious activity.
ifelse { halt }
}


The only part I think i muffed up is the "If" part, idk how to make it look for a certain part of a name. And how do I add more like "[8_", "[[8_" etc..

Last edited by Justin_F; 03/02/07 10:09 PM.
Joined: Jan 2007
Posts: 31
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2007
Posts: 31
I have found that
Code:
on *:join:#: {
  if ($nick == [8_) {
    mode $chan -v $nick
    mode $chan +m
    .notice $nick Please ID to receive a voice!
    msg $chan $nick has be devoiced due to suspicious activity!!!
    msg $chan $nick has be devoiced due to suspicious activity!!!
    msg $chan $nick is not the real user unless he/she is ID and Chanserved for a VOICE!
    ifelse { halt }
  }
}

Works but only if the person is called "[8_" lol, how do I make it work if "[8_" is any part of a persons nick?

Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107

Code:
if ([8_* iswm $nick) 


Untested


Also, remove the line "ifelse {halt}"
It is quite unneccesary, and it is also a non-existant command. I'm surprised it doesn't generate an error.


--------------------
LonDart


LonDart
Joined: Jan 2007
Posts: 31
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2007
Posts: 31
tyvm. And ill fix that halt.

Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
Sorry. That's not quite what you wanted.

If you want to check any nick that has [8_ anywhere in it, use:

Code:
if ( *[8_* iswm $nick )


If you only want to check nicks that begin with either [8_ OR [[8_ , then:

Code:
if (( [8_* iswm $nick ) || ( [[8_* iswm $nick ))



--------------------
LonDart


LonDart

Link Copied to Clipboard