mIRC Home    About    Download    Register    News    Help

Topic Options
#96215 - 30/08/04 05:23 PM Banning people via hostmasks
dmmrs Offline
Ameglian cow

Registered: 15/07/04
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...

Top
#96216 - 30/08/04 05:31 PM Re: Banning people via hostmasks
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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

Top
#96217 - 30/08/04 06:48 PM Re: Banning people via hostmasks
dmmrs Offline
Ameglian cow

Registered: 15/07/04
Posts: 40
ok that works fine smile

Thanks...

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

Top