| View previous topic :: View next topic |
| Author |
Message |
ircguru Voice
Joined: 21 Jul 2007 Posts: 5
|
Posted: Sun Jul 22, 2007 4:14 pm Post subject: request of Why command tcl |
|
|
| hello sir. i need a tcl which gives a why command to op notice when any op join the channel with different nicks .. so the bot will give onotice to channel thanQ! |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Sun Jul 22, 2007 8:36 pm Post subject: |
|
|
This script will opnotice the WHY command to the channel when a user gets opped by Chanserv (better to check on +o mode, rather than on join). Not the best of solutions, but here you go:
| Code: |
#Set your channel services name@services here
set chanserv "chanserv@services.dal.net"
bind mode - "*" check:why:on:op
bind notc - "*" chanserv:why
proc check:why:on:op {nick uhost hand chan mode arg} {
global chanserv chanservwhy
set arg [string tolower $arg]
if {[string equal "+o" $mode] && [string equal "ChanServ" $nick] && [botisop $chan] && ![isbotnick $arg]} {
putserv "PRIVMSG $::chanserv :WHY $chan $arg"
set chanservwhy($arg) 1
}
}
proc chanserv:why {nick uhost hand text {dest ""}} {
global chanservwhy
set text [stripcodes bcruag $text]
set nick [string tolower [lindex $text 0]]
if {[info exists chanservwhy($nick)]} {
if {[isbotnick $dest] && [string equal "ChanServ" $nick] && [string match "*has * access to #* *Reason:*" $text] && [string match -nocase "#*" [string trimright [lindex $text 5] .]]} {
putquick "ONOTICE [string trimright [lindex $text 5] .] :$text"
unset chanservwhy($nick)
}
}
}
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
ircguru Voice
Joined: 21 Jul 2007 Posts: 5
|
Posted: Fri Aug 03, 2007 5:15 am Post subject: Sir Awyeah |
|
|
| Your code is perfect but that is just showing in bot dcc not in onotice .. can u please check it !! |
|
| Back to top |
|
 |
|