| View previous topic :: View next topic |
| Author |
Message |
starpossen Op
Joined: 10 Jan 2006 Posts: 139
|
Posted: Fri Nov 17, 2006 5:00 am Post subject: Enabl and Disable script |
|
|
Is there anyways to make a public command for Enabling and Disabling a script?
Like example:
!scriptname on
!scriptname off
If this has already been covered in another topic, im sorry for my bad search. |
|
| Back to top |
|
 |
deadite66 Halfop
Joined: 30 May 2005 Posts: 74 Location: Great Yarmouth, UK
|
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Fri Nov 17, 2006 1:47 pm Post subject: |
|
|
Example:
| Code: | setudef flag blascript
bind PUB -|- !bla pub:blascript
proc pub:blascript {nickname hostname handle channel arguments} {
if {[string equal "on" [set type [lindex [split $arguments] 0]]]} {
channel set $channel +blascript
} elseif {[string equal "off" $type]} {
channel set $channel -blascript
} elseif {![channel get $channel blascript]} {
return 0
} else {
# Do something here
}
} |
You should be able to implement something similar for your own script(s).[/code] |
|
| Back to top |
|
 |
|