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 

NEXT TCL..

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sat Sep 03, 2005 10:36 am    Post subject: NEXT TCL.. Reply with quote

Hi I need to ask onething if it's possible, I want to bing pub ( FLAGS ) for those who are oped in #BackChannel.

I have this code:
Code:
# commands
set temp(list) [list next voice helped "" noidle "" skip "" put "" list ""]
foreach "temp(1) temp(2)" $temp(list) {
   if {$temp(2) == ""} {set temp(2) $temp(1)}
   foreach temp(bind) [binds next:$temp(2)] {
      unbind pub [lindex $temp(bind) 1] [lindex $temp(bind) 2] next:$temp(2)
   }
   bind pub - .$temp(1) next:$temp(2)
}


Can I do something to make it..
set flags [if {[isop $nick $backchannel]}]
bind pub $flags .$temp(1) next:$temp(2)
.. Like users who are oped in the back channel will be able to use the commands.. is that possible?
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Sep 03, 2005 10:42 am    Post subject: Reply with quote

No that's not possible, you'll either have to give the ops some flag and bind to it or add the [isop] check into your procs.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sat Sep 03, 2005 10:58 am    Post subject: Reply with quote

ey thanks for the reply but I don't wanna give flags or add them in Bots userlist I was wondering if it was possible to make it this way that ops in the backchannel can use the script.. could'nt you modify the part i've pasted above to make it possibe? or something i am kinda new into it..
thanks
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sat Sep 03, 2005 11:09 am    Post subject: Reply with quote

ey see if this is going to work or wrong..

Code:
# commands
set temp(list) [list next voice helped "" noidle "" skip "" put "" list ""]
global backchannel
if {![isop $nick $backchannel]} {return}
foreach "temp(1) temp(2)" $temp(list) {
   if {$temp(2) == ""} {set temp(2) $temp(1)}
   foreach temp(bind) [binds next:$temp(2)] {
      unbind pub [lindex $temp(bind) 1] [lindex $temp(bind) 2] next:$temp(2)
   }
   bind pub - .$temp(1) next:$temp(2)
}
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Sep 03, 2005 11:18 am    Post subject: Reply with quote

Try it yourself and see.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sat Sep 03, 2005 11:18 am    Post subject: Reply with quote

It's still not working using the code I just pasted.. it's listening to everyone.. not only ops in theback channel.
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Sep 03, 2005 11:21 am    Post subject: Reply with quote

you have to add the [isop] checks inside the procs (i.e. next:$temp(2))
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sat Sep 03, 2005 11:56 am    Post subject: Reply with quote

ey thanks I got fixed Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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