**THIS SCRIPT ONLY WORKS FOR SERVERS WITH G-LINE***
This script is supposed to G-Line (permanently ipban from network) and store the nickname of the person in a file called ban.ini. If the banned person joins the channel with the same nick he was banned as, but a different IP (proxy), it g-lines him. This also applies to nick changes. If someone changes their nick to a banned nickname, it g-lines them.
To trigger it, just type !gline and it'll g-line the selected person and set his nick into ban.ini
The purpose of this script is for IRCOps that have to deal with the proxying nuisances of formerly banned people in their IRC network. It bans and saves the nick of the person they wish to ban, so if they come back with a proxy, it'll just re-ban them.
*IF YOU FIND ANYTHING WRONG OR ANYTHING THAT LOOKS WRONG PLEASE TELL ME BECAUSE IM NOT 100% SURE THIS WORKS***
on *:load: echo -a G-line system created by Rath.
on *:INPUT:#:{
if ($1 == !gline) {
if ($2 && $readini(ban.ini,$2) == $null) {
writeini ban.ini $2
echo -a User has been added to the ban list.
}
if ($readini(ban.ini,$2) != $null) echo -a This person is already on your ban list.
}
}
on *:join:#:{
if ($readini(ban.ini)) && ($nick isin ban.ini) {
gline address($nick,2)
}
on *:nick:{
if ($readini(ban.ini)) && ($nick isin ban.ini) {
gline $address($nick,2)
}
}
1) Your /writeini and $readini lines are missing parameters.
If this script works, it's a fluke.
Refer to mIRC's help file /help /writeini and /help $readini for more information.
2) Glines require IRCop status to be able to set/remove them, yet there is nothing in the code to ensure that the client running the code has the required access.
3) The $nick references in the ON NICK event refer to the old nick.
You probably want to refer to the nick that they changed to, so you need to change those $nick references to $newnick
I am unable to accurately rate this script, based on the information I have posted above, and the fact that the lowest rating is a 1 for bad/ripped.
if ($2 && $readini(ban.ini,$2) == $null) {
writeini ban.ini $2
echo -a User has been added to the ban list.
if ($readini(ban.ini,$2) != $null) echo -a This person is already on your ban list.
}
The bracket should go before the second if:
if ($2 && $readini(ban.ini,$2) == $null) {
writeini ban.ini $2
echo -a User has been added to the ban list.
}
if ($readini(ban.ini,$2) != $null) echo -a This person is already on your ban list.