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.

Request for on-join /chanserv WHY #chan nick TCL

Old posts that have not been replied to for several years.
Locked
a
angang

Request for on-join /chanserv WHY #chan nick TCL

Post by angang »

Hi is there any tcl which will perform an on-join /chanserv why and save the result in a text file (logs) ?

If not , i have a suggestion , which i think it'll be very useful for the channel to trace those mkickers.

Make a tcl script which will :
1) When a user is opped by chanserv , ie ChanServ -mode- +o $nick , the script will /chanserv WHY #channel $nick

2) Chanserv will return the WHY result , and save it into log file , eg: WHY.txt

3) In those WHY.txt will save all the chanserv WHY results.

This very useful to track who is the mkicker . Bcos some mkicker will simply identify to the AOP/SOP's nick , and disguised into another nick, which is very hard to trace which AOP/SOP did the mkick. I believe what i suggest can easily solve this problem.

------------------------
Second problem :

If my eggdrop is banned, it'll automatically /chanserv unban itself. but it takes about 10-30 seconds to join back . Why ? Is there anyway to make it rejoin back asap ? thanks

If anyone can kindly put my idea into a tcl script , i'd be very grateful . Thanks
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

Showing us the output of "/msg ChanServ WHY" would help...:P
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Code: Select all

#---------------------------------------------------------------------
# why.tcl
# Tcl script for IRC bot Eggdrop
#
# Upon a +o mode by chanserv (dal.net) this script sends out a
# WHY to chanserv and puts the result in the file WHY.txt
#
# v0: 07-JUN-2004
#---------------------------------------------------------------------

package require Tcl 8.0

bind mode - * mode:why

bind notc - * notc:why

proc mode:why { nick uhost hand chan mchange victim } {

   # check mode change

   if { $mchange != "+o" } { return 0 }

   # check nick and uhost opper is chanserv

   if { $nick != "ChanServ" } { return 0 }

   if { $uhost != "service@dal.net" } { return 0 }

   # send a "why" message to chanserv

   set chanserv chanserv@services.dal.net

   puthelp "PRIVMSG $chanserv :WHY $chan $victim"

}

proc notc:why { nick uhost hand text dest} {

   global botnick

   # destination must be the bot

   if { $dest != $botnick } { return 0 }

   # check nick and uhost is chanserv

   if { $nick != "ChanServ" } { return 0 }

   if { $uhost != "service@dal.net" } { return 0 }

   # a WHY result?

   set matchrule {* has * access to *}

   if { ![string match $matchrule $text] } { return 0 }

   # save the why result to file

   set cformat {%d-%b-%Y-%H:%M}

   set stamp [clock format [clock seconds] -format $cformat]

   set fd [open WHY.txt a+]

   puts $fd "$stamp $text"

   close $fd

}

putlog "Loaded (version 0): why.tcl"
Locked