I've some Problem getting the testpart of my script working.
(I know the script isn't very nice and all - I'm just testing, before getting it all together and cleaning)
The problem is, botonchan always gives false though the bot is definitly on the chan and has op (set by chanserv - the bot is registered by NickServ)
my joining of channels:
Code: Select all
...
puthelp "PRIVMSG $channel :Ich geh nach $text"
channel add $text
...
and after that i'm testing, if he's on:
Code: Select all
proc pub:op:test { nick user hand chan arg } {
global channel botnick
set dchan [channame2dname $chan]
resetchan "$chan"
if {![hlp:user $nick]} {
puthelp "PRIVMSG $chan :Leider kenn ich dich nicht !"
return 1
}
if { [onchan $botnick $chan] } {
puthelp "PRIVMSG $chan : hm hm - so scheints zu gehen !"
} else {
puthelp "PRIVMSG $chan : wenigstens geht garnichts !"
}
if { [botonchan [string tolower $dchan]] } {
puthelp "PRIVMSG $chan : ich bin da !"
} else {
puthelp "PRIVMSG $chan : Haehm - hier ist definitv was nicht richtig ! ($chan - $dchan)"
}
...
with dcc .status i get:
Code: Select all
Tcl library: /usr/lib/tcl8.3
Tcl version: 8.3.3 (header version 8.3.3)
Channels: #Drizzit (trying), #cb-tempel (trying)
Online as: Woelfchen!~eggdrop@eu-irc-19999F9C.dip.t-dialin.net (/msg Woelfchen hello)
Server irc.swissirc.net:6667 (connected for 01:18)
#Drizzit : (pending), enforcing "+ltn 5" (greet, bitch)
#cb-tempel: (pending), enforcing "+tn" (greet)
I think the problem lies somewhere in the (trying) but I can't figure out how to solve it, or where I'm wrong
Please help !! - I'm stuck !