| View previous topic :: View next topic |
| Author |
Message |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Fri Dec 28, 2007 3:35 am Post subject: Flags or what? |
|
|
Hi there. I am new in Tcl scripting, and I made script for public commands !op !deop !halfop !dehalfop !voice !devoice. But the script works only for me (I am owner of the bot), no for other ops in the channel. I do not know how to made script wich can be used by other op in channel, no only by me. Using of flag -|- is no a solution, coz then evryone can do !op, or !deop, but flag o|o works only for me...
Does anybody know how to fix that whitout using of access list grabbing?
This is short example of my code:
| Code: |
###########
# TRIGGER #
###########
bind pub o|o !op op
######
# OP #
######
proc op {nick host hand chan text} {
set target [lindex $text 0]
set target1 [lindex $text 1]
set target2 [lindex $text 2]
if {$target == ""} {
putserv "MODE $chan +o $nick"
} else {
putserv "MODE $chan +ooo $target $target1 $target2"
}
}
|
|
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Dec 28, 2007 4:23 am Post subject: |
|
|
If you add them to the bots userfile. To use the command !op for instance would only require them to have the +o flag for the channel where they need to use the !op command. Other than that, they dont really need any other flags unless you have !voice as +v then people that use !voice will need the +v flag for a channel that they can use !voice on. From the binds its <global flag>|<channel flag> so you can be alot safer if you stick to giving out channel flags only. And you keep the global flags for your self  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Fri Dec 28, 2007 5:45 am Post subject: |
|
|
| Yeah, I see. But is there any way to do that instead of puting 184 peoples in more over 16 channels in bots userfile?? I want to anybody who have just @ can use !op command, even if he is'nt at any access list or bots userfile.... |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Dec 28, 2007 6:46 am Post subject: |
|
|
Pretty simple just use | Code: | | bind pub -|- <command> <proc> | for the binds and in the script add at the start of the proc. | Code: | | if {![isop $nick $chan]} {return 0} | should only allow people that are oped to use them. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Fri Dec 28, 2007 7:43 am Post subject: |
|
|
| Nice, very nice! It work just fine now! Thank You very much! |
|
| Back to top |
|
 |
|