egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Kicked user PM

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Way2Death
Voice


Joined: 31 Mar 2009
Posts: 15

PostPosted: Tue Mar 31, 2009 3:38 pm    Post subject: Kicked user PM Reply with quote

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.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Mar 31, 2009 4:11 pm    Post subject: Reply with quote

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:
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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Way2Death
Voice


Joined: 31 Mar 2009
Posts: 15

PostPosted: Tue Mar 31, 2009 4:36 pm    Post subject: Reply with quote

Thanks for your help, will test it out Very Happy

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
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Mar 31, 2009 4:59 pm    Post subject: Reply with quote

Ohh, sorry,
Forgot to add the binding...
Code:
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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Way2Death
Voice


Joined: 31 Mar 2009
Posts: 15

PostPosted: Tue Mar 31, 2009 5:15 pm    Post subject: Reply with quote

Thanks it works Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber