mIRC Home    About    Download    Register    News    Help

Print Thread
#96215 30/08/04 04:23 PM
Joined: Jul 2004
Posts: 40
D
dmmrs Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jul 2004
Posts: 40
OK, ive managed to get this far, but i dont know how to ban people via their hostmask in a script. I know your probably thinking, jeez...thing is, i know how to ban via a hostmask normally, however, i cant add it into this script. Maybe the code will make a bit more sense:

ON *:text:!ban *:#trouble-chat: {
if ($read(recruits.txt,s, $2- )) && (($nick isop #trouble-chat) || ($nick == MiLiTiA)) {
write -ds $2- recruits.txt
msg $chan 4Hey,8 $nick 4you requested a ban from Trouble chat for8 $2- 4. They were found on the recruits list, so they will now be banned from chat.8 $2- 4will also be removed from the recruits list.
mode #trouble-chat +b $2-
kick #trouble-chat $2- 4You have been banned from 8Trouble chat4 by8 $nick 4. Please msg8 $nick 4 for more information.
haltdef
}
else { msg $chan 4Sorry,8 $nick 4either you do not have the authority to ban8 $2- 4from 8Trouble chat4, or8 $2- 4is not on the recruit list.
msg $chan 4Please check the list via8 !find nick 4or ask an op to ban8 $2- 4instead. }
}

I have made the text red and bold that is being a problem.

Any ideas? I want the ban to be via a hostmask as opposed to the nick smirk

Very confusing.


i script, therefore i am smirk
theres logic in there somewhere...
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Use /ban

/ban #channel nickname 2 - The 2 bans whatever is after the @ in /whois.

You could also delete the kick command by using /ban -k #channel nickname 2 Reason Goes Here.

If you really want to use /mode however, you can use $address(nickname,2).

Regards,


Mentality/Chris
Joined: Jul 2004
Posts: 40
D
dmmrs Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jul 2004
Posts: 40
ok that works fine smile

Thanks...

smile


i script, therefore i am smirk
theres logic in there somewhere...

Link Copied to Clipboard