This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

on connect akill the bad nick

Old posts that have not been replied to for several years.
Locked
N
NxT

on connect akill the bad nick

Post by NxT »

is there any tcl for on connect akill for the bad nick?
or what will be the code to on connect?

like:

-irc[dot]server[dot]com- *** Notice -- Client connecting on port 6667: adopav (~poqvds@202.165.253.12) [clients]
-
-irc[dot]server[dot]com- *** Global -- from OperServ: BOT added an AKILL for *@202.165.253.12 ([BOT] Badnick) (expires in 69 days)

Thanks
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

try this:

Code: Select all

set akillnicks {
  "nick1"
  "nick2"
  "nick3"
  "etc."
}

bind raw - NOTICE client:connect

proc client:connect {from keyword args} {
  global akillnicks
  if {[string match "*Client connecting on port*" $args]} {
    set usernick [lindex [split $args] 9]
    foreach nick $akillnicks {
      if {[string equal -nocase $nick $usernick]} {
        # your akill thing here
        break
      }
    }
  }
}
Once the game is over, the king and the pawn go back in the same box.
N
NxT

Post by NxT »

Thanks alot for this code and can you tell me how i can banned bad ident and real name same way :wink:


Thanks
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

caesar wrote:

Code: Select all

set akillnicks {
  "nick1"
  "nick2"
  "nick3"
  "etc."
}

bind raw - NOTICE client:connect

proc client:connect {from keyword args} {
  global akillnicks
  if {[string match "*Client connecting on port*" $args]} {
    set usernick [lindex [split $args] 9]
    foreach nick $akillnicks {
      if {[string equal -nocase $nick $usernick]} {
        # your akill thing here
        break
      }
    }
  }
}
Take care, this will work only on local server, the message isn't the same if you have more than 1 server and if the bad client connects to a different server than where the bot is connected.
You'd better check for Client connecting
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

NxT wrote:Thanks alot for this code and can you tell me how i can banned bad ident and real name same way :wink:
Perform a /whois $nick and then parse raw 311:
311 RPL_WHOISUSER
"<nick> <user> <host> * :<real name>"
N
NxT

Post by NxT »

CrazyCat wrote:Take care, this will work only on local server, the message isn't the same if you have more than 1 server and if the bad client connects to a different server than where the bot is connected.
You'd better check for Client connecting
Ok I Understand.

Akill command will be like this maybe

Code: Select all

set banmask *!*@[lindex [split $from @] 1] 
putserv "PRIVMSG OperServ :AKILL ADD +30d $banmask :BadNick" 
But i don't know howto whois and detect bad realname and bad ident

can u write the full code plz

actually i wanted something what can detect the flood bot nick ident or realname auto and akill them on connect

have a look at http://forum.egghelp.org/viewtopic.php?t=6756

Thanks for helping me :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

CrazyCat : well, duh! he pasted the local client connection:
-irc[dot]server[dot]com- *** Notice -- Client connecting on port 6667: adopav (~poqvds@202.165.253.12) [clients]
Once the game is over, the king and the pawn go back in the same box.
Locked