| View previous topic :: View next topic |
| Author |
Message |
stevegarbz Op
Joined: 04 Dec 2004 Posts: 104
|
Posted: Fri Feb 17, 2006 1:01 pm Post subject: Bot kicked, report to chan |
|
|
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! |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Feb 17, 2006 8:29 pm Post subject: |
|
|
| Code: | 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]]"
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
stevegarbz Op
Joined: 04 Dec 2004 Posts: 104
|
Posted: Fri Feb 17, 2006 8:34 pm Post subject: |
|
|
Thanks, by the way, your allfloodprotection script is superb Been using it since it was released |
|
| Back to top |
|
 |
stevegarbz Op
Joined: 04 Dec 2004 Posts: 104
|
Posted: Fri Feb 17, 2006 8:44 pm Post subject: |
|
|
Hmm, came across a problem:
| Quote: | | Tcl error [report:kick]: wrong # args: should be "report:kick nick uhost chan hand targ" |
So, I changed the code to:
| Quote: | 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:
| Quote: | | Tcl error [report:kick]: wrong # args: should be "report:kick nick uhost chan hand targ" |
Any ideas? Thanks! |
|
| Back to top |
|
 |
Winters Voice
Joined: 09 Jul 2005 Posts: 29
|
Posted: Sat Feb 18, 2006 4:32 am Post subject: |
|
|
| Code: |
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 |
|
| Back to top |
|
 |
stevegarbz Op
Joined: 04 Dec 2004 Posts: 104
|
Posted: Sat Feb 18, 2006 11:01 am Post subject: |
|
|
Works!
Thanks a lot! |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Feb 18, 2006 11:40 am Post subject: |
|
|
Yeah my bad, always look into Tcl-commands.doc
| Quote: | 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 |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|