mIRC Homepage

Banning people via hostmasks

Posted By: dmmrs

Banning people via hostmasks - 30/08/04 04:23 PM

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.
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.
Posted By: Mentality

Re: Banning people via hostmasks - 30/08/04 04:31 PM

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).

Posted By: dmmrs

Re: Banning people via hostmasks - 30/08/04 05:48 PM

ok that works fine smile


© 2019 mIRC Discussion Forums