Needs revenge tcl script that can kick back user who uses X command to kick the bot in Undernet.
The current revenge tcl script that I found can only kick revenge directly to the user who made the kick,
but if the user uses X command like /msg x kick #channel botname the bot cannot do anything coz it only see @X kicked the bot but not the user who uses the x kick command.
bind kick - "*" my:kick
# kick extractor
proc my:kick {nick uh hand chan vict reas} {
if {$nick != "X"} { return 0 }
set kicker [string trim [lindex [split $reas] 0] {()}]
if {$vict == $::botnick} {
putquick "PRIVMSG X :remuser $chan ${kicker}"
}
return
}
You may change the putquick "PRIVMSG X :remuser $chan ${kicker}" line with what you want. ${kicker} is the username of the person who kicked him using X.
Once the game is over, the king and the pawn go back in the same box.
Hello caesar i have a new idea, since it can only detect the username can we can modify the script like:
###########################################
bind kick - "*" my:kick
# kick extractor
proc my:kick {nick uh hand chan vict reas} {
if {$nick != "X"} { return 0 }
set kicker [string trim [lindex [split $reas] 0] {()}]
if {$vict == $::botnick} {
#get the username
putquick "PRIVMSG X :remuser $chan ${kicker}"
# from /msg x info username command we can add this
putquick "PRIVMSG X :info ${kicker}"
#can u add another script that scans the UserNickName from the output
#from /msg x info UserName or "PRIVMSG X :info ${kicker}" then ban it.
" script here - - - - - - --- -- - - - - - - "
}
return
}
####################################
note: " /msg x info username" will give the NickName of the Username
[13:33] -X- Information about: Mayonaise (481602)
[13:33] -X- Currently logged on via:
[13:33] -X- UserNickName!linuxfreak@69.31.9.3
[13:33] -X- Language: 1
[13:33] -X- INVISIBLE is Off
[13:33] -X- LAST SEEN: 0 days, 00:37:21 ago.
The kick extractor is a part of my xstuff.tcl. You can give it a try if you want or something. Anyway if you do an info on the kicker and if he is invisible then what? Better scann the channel is matches someone do whatever or even place an ban on *!*@userofthekicker.users.undernet.org
Once the game is over, the king and the pawn go back in the same box.
Anyway if you do an info on the kicker and if he is invisible then what? <---- then if it on invisible mode then it will execute the next line which is remuse
but I notice the majority of the usernames are on visible mode.
If u can add that line I was talking about it would be a nice addition like this:
-------
start
if kick then
extract username
scan for info to find nick
if found nick then ban nick and remuse username
else if invisible then remuse username
done
--------