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.

Bot kicked, report to chan

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Bot kicked, report to chan

Post by stevegarbz »

Hello,

I am looking for a script so my eggdrop will report being kicked to a certain channel, #chan.

ex:

<KICKER> !kick bot
Bot was kicked from #kickedchan

Now, in #chan:
Kicked from #kickedchan by $who(in this case, KICKER) at $date.....

----------------------------------

Thanks in advance,
Steve!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind kick - * report:kick

proc report:kick {nick uhost hand chan targ} {
 if {[isbotnick $targ] && [botonchan #reportchan]} {
  puthelp "privmsg #reportchan :I was kicked from $chan by $nick at [ctime [unixtime]]"
 }
}
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

Thanks, by the way, your allfloodprotection script is superb ;) Been using it since it was released
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

Hmm, came across a problem:
Tcl error [report:kick]: wrong # args: should be "report:kick nick uhost chan hand targ"
So, I changed the code to:
bind kick - * report:kick

proc report:kick {nick uhost chan hand targ} {
if {[isbotnick $targ] && [botonchan #PE]} {
putquick "onotice #PE :I was kicked from $chan by $nick at [ctime [unixtime]]"
}
}
(Error still comes up if it's privmsg #PE)

Getting error:
Tcl error [report:kick]: wrong # args: should be "report:kick nick uhost chan hand targ"
Any ideas? Thanks!
W
Winters
Voice
Posts: 29
Joined: Sat Jul 09, 2005 12:24 pm

Post by Winters »

Code: Select all

bind kick - * report:kick

proc report:kick {nick uhost hand chan targ reason} {
 if {[isbotnick $targ] && [botonchan #reportchan]} {
  puthelp "privmsg #reportchan :I was kicked from $chan by $nick at [ctime [unixtime]]"
 }
}
Try this
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

Works!

Thanks a lot!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Yeah my bad, always look into Tcl-commands.doc
KICK (stackable)
bind kick <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <target> <reason>

Description: triggered when someone is kicked off the channel. The
mask is matched against '#channel target reason' where the target is
the nickname of the person who got kicked (can contain wildcards).
The proc is called with the nick, user@host, and handle of the
kicker, plus the channel, the nickname of the person who was
kicked, and the reason; flags are ignored.
Module: irc
Post Reply