Auto-GLine/List

By Rath on Oct 30, 2008

**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)
  }
}

Comments

Sign in to comment.
Jethro   -  Jul 21, 2011

TheWhistler, this snippet needs fixing. Not only does it miss parameters, the nick event is set up incorrectly with $nick, which should have been $newnick

 Respond  
TheWhistler   -  Jul 21, 2011

/if: invalid format (line 12, auto-glinelist.MRC)

on *:join:#:{
line 12>-> if ($readin (ban.ini)) && ($nick isin ban.ini) {
gline address($nick,2)

 Respond  
F*U*R*B*Y*   -  Nov 04, 2008

!gline !@* <--- stuffs up your bot :D

 Respond  
RusselB   -  Nov 04, 2008

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.

 Respond  
Rath   -  Oct 30, 2008

a gline already bans the persons ip, so no need to add it to ban.ini :s

 Respond  
guest598594   -  Oct 30, 2008

Well it'd be easier to change a nick than use a proxy :)

 Respond  
Rath   -  Oct 30, 2008

yes but it wont matter because they'll just return with a proxy. I made this script in order to somehow get around that.

 Respond  
guest598594   -  Oct 30, 2008

It wouldn't be that hard to fix it, you just change $nick to $address($nick,2) or whichever address you want.

 Respond  
Rath   -  Oct 30, 2008

Yeah, I've already thought of that. This script should be used for small communities with their own IRC servers. I DO NOT recommend using this script if you have over maybe 300 people a day connecting to your network.

 Respond  
napa182   -  Oct 30, 2008

the only thing is what if someone else joins with the same nick as the person that got Glined. So they get Glined for no reason but having the same nick..
maybe add an exempt for that persons ip

 Respond  
guest598594   -  Oct 30, 2008
    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.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.