| View previous topic :: View next topic |
| Author |
Message |
mindflow Voice
Joined: 10 Mar 2005 Posts: 22
|
Posted: Wed Dec 28, 2005 5:28 am Post subject: if $botnick !isop $chan |
|
|
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 |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Dec 28, 2005 5:48 am Post subject: |
|
|
| 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 |
|
 |
mindflow Voice
Joined: 10 Mar 2005 Posts: 22
|
Posted: Wed Dec 28, 2005 5:56 am Post subject: |
|
|
and if it's not oped? plz point me to the right doc about this info
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 ???  |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Wed Dec 28, 2005 8:22 am Post subject: |
|
|
| Code: |
if [botisop $chan] {
#do something
} else {
#if the bot is not oped do something else
}
|
|
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Dec 28, 2005 9:00 am Post subject: |
|
|
You seem to wish to know Tcl mindflow, so here's a link for you to bookmark.
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 |
|
 |
|