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 

if $botnick !isop $chan

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


Joined: 10 Mar 2005
Posts: 22

PostPosted: Wed Dec 28, 2005 5:28 am    Post subject: if $botnick !isop $chan Reply with quote

Hi, i was trying to make my bot see if it have ops on a channel, but i cant sove how the code should look like, it will be inplanted in a working TCL..

proc UnReal {nick uhost hand chan arg} {
global botnick
check if bot is oped here { do this if bot arent oped then a halt }
rest of code here, if bot is oped in the channel the script is triggered in
it should only keep on reading the TCL
}

hope you understand what i want to do, someone that can help me with this?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Dec 28, 2005 5:48 am    Post subject: Reply with quote

Code:

if [botisop $chan] {
...

_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
mindflow
Voice


Joined: 10 Mar 2005
Posts: 22

PostPosted: Wed Dec 28, 2005 5:56 am    Post subject: Reply with quote

and if it's not oped? plz point me to the right doc about this info Smile


This is what i get from tcl-commands.doc

botisop [channel]
Returns: 1 if the bot has ops on the specified channel (or any channel
if no channel is specified); 0 otherwise
Module: irc


but that dosent tell me anything on how to see if the bot is oped or not,

if [botisop $chan] {

trigger the script if the bot have op, and halt it if the bot dosent have op.. but i want to be able to send one line of text to the channel when the bot dosent have op, then halt the script, now it only halt if the bot dosent have ops.. :/ so what do i miss here?

this is what i have so far:

proc UnReal {nick uhost hand chan arg} {
set mess "[string tolower [lindex $arg 0]]"
set messa "[string tolower [lindex $arg 0]]"
if {[botisop $chan] == 0} {
puthelp "PRIVMSG $chan :$nick, message"
return 0
# working ok if bot is deoped
if [botisop $chan] {
# do the rest of the code dosent work, same with if i change it to if {[botisop $chan] == 1} still no luck ??? Sad
Back to top
View user's profile Send private message
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Wed Dec 28, 2005 8:22 am    Post subject: Reply with quote

Code:

   if [botisop $chan] {
   #do something
   } else {
   #if the bot is not oped do something else
   }

Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Dec 28, 2005 9:00 am    Post subject: Reply with quote

You seem to wish to know Tcl mindflow, so here's a link for you to bookmark. Very Happy

http://www.tcl.tk/man/tcl8.4/TclCmd/
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
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