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 

Bot kicked, report to chan

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


Joined: 04 Dec 2004
Posts: 104

PostPosted: Fri Feb 17, 2006 1:01 pm    Post subject: Bot kicked, report to chan Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Feb 17, 2006 8:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
stevegarbz
Op


Joined: 04 Dec 2004
Posts: 104

PostPosted: Fri Feb 17, 2006 8:34 pm    Post subject: Reply with quote

Thanks, by the way, your allfloodprotection script is superb Wink Been using it since it was released
Back to top
View user's profile Send private message
stevegarbz
Op


Joined: 04 Dec 2004
Posts: 104

PostPosted: Fri Feb 17, 2006 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
Winters
Voice


Joined: 09 Jul 2005
Posts: 29

PostPosted: Sat Feb 18, 2006 4:32 am    Post subject: Reply with quote

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
View user's profile Send private message
stevegarbz
Op


Joined: 04 Dec 2004
Posts: 104

PostPosted: Sat Feb 18, 2006 11:01 am    Post subject: Reply with quote

Works!

Thanks a lot!
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 18, 2006 11:40 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
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