Thursday, June 9, 2011

IRC opera banning - to ban nicknames

Okay, I've been writing this up for ages now, it's getting nowhere so I thought to upload it and then I'll be forced to edit it sooner because everyone can see how shitty it is.So be warned - This is the first draft!
*This is now a quick edit, second draft.... Don't know what the changes will be yet.


Banning


By now you've see some cool stuff, pretend log-on scripts and a bit of privacy stuff.


If you decide to create a room in the Opera network with the Opera browser and it gets popular.....
You'll need to think about banning, auto kick and operator commands.
First off, lets say you have a cool new room: #cool_room we'll call it.
You've registered it, assigned one of your mates to gain full ops or half ops, and protect them.
That's great.
But now a particular annoying user keeps joining and being a nuisance...
You could start off just by right clicking their name and using the kick/ban options. This should be fine for most users. Adding to the ban list for that channel.

*note: The ban list is forgotten whenever the room is completely empty.
So if you're not running a bot to keep the room 'open' you should think about putting the ban list in the log-on commands list. See HERE.


Right, lets say a user 'lupin' is being really annoying, first warning you kick 'lupin' from the room, second time kick and ban him/her. - Usually just ban a nick for 1 - 8 hours depending on what I'm doing. If the user is mucking up again chuck their IP address into the ban list forever.




If the user doesn't come back - problem solved... But...
But then this nick keeps coming back and coming back!



It gets a bit tedious to keep putting ban after ban on.
First lets understand what's happening:
The user has a dynamic ip address - This is fine, most people do unless they're running a web or file server of some sort.

So under windows, all they have to do to change their ip address is in the command prompt: ipconfig /release and then ipconfig /renew.
Or most would just restart their router.
Both just request a new ip address from their isp.
So the commands for banning are as follows:

/mode #cool_room +b *!*@80.232.43.46




Now this will put a ban on the IP address only and all the users attributed to that IP address.

Alternatively you could use:



/mode #cool_room +b *!*lupin



And just ban the nick.

Right now the real surprise happens when the very same nick comes right back! This is caused by that dynamic ip stuff.
 So now to put a 'wild-card' in the banning command:

 /mode #cool_room +b *!*@80.232.43.*

The '*' bans the complete range of numbers from 0 - 255 in the last octet of the ip address. This will usually foil the nickname.
 If not;
 /mode #cool_room +b *!*@80.232.*.*

Will most certainly ruin their plans.
*note:  '/mode #cool_room +b *!*@80.232.*' will not work in opera irc at present, don't know why really.

There's a whole lot more to banning - Such as using ChanServ to kick and ban users, but opera does have decent documentation on that so I'll skip it..