| View previous topic :: View next topic |
| Author |
Message |
raws17 Voice
Joined: 05 Mar 2008 Posts: 1
|
Posted: Wed Mar 05, 2008 8:03 am Post subject: [Eggdrop]Check if the bot has +ao @L via !check |
|
|
Hello,
i test it but there is an error.
I want the bot to check via a command (!check)
if he's op in every channel except my main channel.
And if hes not OP he should write a message in the chan and part it.
| Code: |
#BINDS
bind Pub n "!checkall" start:check
proc start:check { nickname hostname handle channel arguments } {
# Userchannel
#set userchannel [lindex $arguments 0]
# Main channel
set main "##raw"
# Checks if we are opped on channel.
if {[botisop [channels]]
return 0
# Wenn nicht -->
{
if {[info exists chlist]} {lappend chlist $chan} {set chlist [channels]}
# checken
putserv "PRIVMSG $userchannel : Kein +ao - Ich leave
putserv "PRIVMSG $main : Habe kein +ao in $userchannel - Raus da!
channel remove $userchannel
}
# prozess beenden
return 1
}
# Gives some nice credits :P~
putlog "--Just a test--"
|
thx alot ! |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Wed Mar 05, 2008 8:32 am Post subject: |
|
|
'botisop' does not accept a list of channels (which is what 'channels' returns) and your command starting with "{" makes no sense at all.
You'll need a loop to check each channel ('foreach' would be the obvious choice, as you're looping through the elements of a list of channel names)
I suggest you start by learning tcl's syntax, then read some other scripts to get an idea about what commands might be useful for you (and check their details in the relevant manual/doc-file)
Native tcl commands
eggdrop commands: doc/tcl-commands.doc (in your eggdrop dir)
...or maybe you're looking for the Script Requests forum? _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
spijon Voice
Joined: 27 Aug 2006 Posts: 33
|
Posted: Fri Aug 15, 2008 8:09 pm Post subject: |
|
|
Did you finish the script?
Look for more or less the same but to work on Quakenet.org
!check-all or auto check
The bot "jump" the channels its haven't got +a or +o on.
And msg chan "give me voice/op or i part" and if not +v or +o after like 10min its parts. And msg the "main" chan with the info.
Best regards
Spijon |
|
| Back to top |
|
 |
|