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.

Kicked user PM

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
W
Way2Death
Voice
Posts: 15
Joined: Tue Mar 31, 2009 3:30 pm

Kicked user PM

Post by Way2Death »

Hey all,
i would like to know if the following is possible.
When Q (quakenet bot) kicks/bans someone the bot sends a PM to the kicked/banned player containing some text.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

That shouldn't be too hard.
Q's kick should trigger the kick binding, just like anyone else. You'd then have to check whether it was Q that did the kicking or someone else.
The last part is simply a matter of using puthelp to send a msg to the target.

Rough example:

Code: Select all

proc Qkick {nick host handle channel target reason} {
 if {[string equal -nocase $nick "Q"]} {
  puthelp "PRIVMSG $target :You've been kicked by Q!"
 }
}
NML_375
W
Way2Death
Voice
Posts: 15
Joined: Tue Mar 31, 2009 3:30 pm

Post by Way2Death »

Thanks for your help, will test it out :D

hm a little question,
could that code be used, because will the tcl automatically start the if string or do i have to put something that will initiate it when someone gets kicked?

Edit; well it didn't work... i have no idea why not
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Ohh, sorry,
Forgot to add the binding...

Code: Select all

proc Qkick {nick host handle channel target reason} {
 if {[string equal -nocase $nick "Q"]} {
  puthelp "PRIVMSG $target :You've been kicked by Q!"
 }
}
bind kick - * Qkick
NML_375
W
Way2Death
Voice
Posts: 15
Joined: Tue Mar 31, 2009 3:30 pm

Post by Way2Death »

Thanks it works :)
Post Reply