egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Flags or what?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
CyberianIce
Voice


Joined: 28 Dec 2007
Posts: 12

PostPosted: Fri Dec 28, 2007 3:35 am    Post subject: Flags or what? Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 28, 2007 4:23 am    Post subject: Reply with quote

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 Smile
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
CyberianIce
Voice


Joined: 28 Dec 2007
Posts: 12

PostPosted: Fri Dec 28, 2007 5:45 am    Post subject: Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 28, 2007 6:46 am    Post subject: Reply with quote

Pretty simple Very Happy 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
View user's profile Send private message Send e-mail
CyberianIce
Voice


Joined: 28 Dec 2007
Posts: 12

PostPosted: Fri Dec 28, 2007 7:43 am    Post subject: Reply with quote

Nice, very nice! It work just fine now! Thank You very much!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber