View previous topic :: View next topic |
Author |
Message |
Ulrik Voice
Joined: 29 Sep 2005 Posts: 1
|
Posted: Thu Sep 29, 2005 9:09 am Post subject: modif tcl |
|
|
Hi!
how to change it tcl for use all channel and authorized m|m has op / deop
thx all help and sorry for my English..
Code: |
#put here the channel that the bot must protect
set prochan "#loldelol"
bind mode - *-o* deop
proc deop {nick uhost hand chan args} {
global botnick home servicename prochan
set dnick [lindex $args 1]
if {$chan == $prochan} {
if {$dnick == $botnick} {
putserv "NOTICE $nick :your deop of the bot has been logged !!"
putchan $home "$nick deoped me on $chan" }
if {$nick == $botnick} {
putchan $chan "i'm sorry i have to do this ..." } else {
putserv "MODE $chan -o $nick"
putserv "MODE $chan +o $dnick" }
} else {
return 1 }
return 1
}
bind mode - *+o* op
proc op {nick uhost hand chan args} {
global botnick home servicename prochan
set dnick [lindex $args 1]
if {$chan == $prochan} {
if {$dnick == $botnick} {
putchan $chan "wel i can't say no ... tnx dude !"
return 1 }
if {$nick == $botnick} {
putchan $chan "now say tnx !!!" } else {
putserv "MODE $chan -o $dnick" }
} else {
return 1 }
return 1
}"
|
|
|
Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Sep 29, 2005 12:47 pm Post subject: |
|
|
not sure what you mean about the m|m thing, but for the channel thing you need to remeve the '$chan == $prochan' condition. in case you want masters to be not logged/punished replace '$chan == $prochan' with '![matchattr $hand m|m $chan]'.
PS: post code in [code] tags, otherwise whitespaces are beeing collapsed by the web browser that destroys code formating.
PPS: the code is ugly anyway, you shouldn't learn from such . _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Sep 29, 2005 7:14 pm Post subject: |
|
|
Quote: | bind <type> <flags> <keyword/mask> [proc-name]
flags are the flags the user must have to trigger the event (if applicable). |
Example:
Code: | bind mode m|m +o op
bind mode m|m -o op |
For further assistance on flags, via the Command Console:
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
Back to top |
|
 |
|