This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

chanlist doesn't work

Old posts that have not been replied to for several years.
Locked
R
Regedit01

chanlist doesn't work

Post by Regedit01 »

Greetings from Poland! I am a 19-year-old programmer, I just learnt TCL and now I'm writing a script that will lead a statistics for IRC channels.

I have a very big problem. I was working on it all day long without effect. After many tests I found that "chanlist" eggdrop TCL command doesn't work when there are more than 1 channels no the eggdrop's channel list. It just returns an empty list! I tried everyting what came to my head, including calling "resetchan".

At present, my test code looks like this:

Code: Select all

proc TestDebug {aText} {
  putserv "PRIVMSG Regedit :(DEBUG) $aText"
}

proc Test_List {snick shost shandle stext} {
  foreach {chan} [channels] {
    TestDebug "$chan: [join [chanlist $chan]]"
  }
}

bind msg n "lista" Test_List
Maybe someone of you know the reason of this problem? Is this a bug in the eggdrop, is this a well known problem or I'm just doing something wrong?
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: chanlist doesn't work

Post by egghead »

Regedit01 wrote: [snip]
I have a very big problem. I was working on it all day long without effect. After many tests I found that "chanlist" eggdrop TCL command doesn't work when there are more than 1 channels no the eggdrop's channel list. It just returns an empty list! I tried everyting what came to my head, including calling "resetchan".
[snip]
Maybe someone of you know the reason of this problem? Is this a bug in the eggdrop, is this a well known problem or I'm just doing something wrong?
Likely the latter. [chanlist] works fine here (eggdrop 1.6.13). Are you sure that the channels are not set to +inactive? In that case [chanlist] remains empty.
R
Regedit01

Post by Regedit01 »

I use eggdrop 1.6.15 and all my channels have -inactive.

I just heard from my friend, GoQ, that he has the similar problem. When he tries to write the command ".say #channel text", he gets message like "I'm not on that channel". When he writes ".channel #channel", he gets that there are 0 members.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Not sure if this is what you want but, I use this code in a public commands script for my loan bots:

set chanlist ""
foreach c [channels] {
if {![onchan $botnick $c]} {
set chan "${c}(trying)"
} elseif {[isop $botnick $c]} {
set chan "@$c"
} elseif {(![isop $botnick $c]) && ([isvoice $botnick $c])} {
set chan "+${c}(want ops!)"
} elseif {![isop $botnick $c]} {
set chan "${c}(want ops!)"
} elseif {[isvoice $botnick $c]} {
set chan "+$c"
} else {
set chan $c
}
if {[isdynamic $c]} {
set chan "<${chan}>"
}
append chanlist "$chan "
}
putcmdlog "channel list:<<$nick>> #$hand# requested my channel list."
notice $nick "I monitor: $chanlist"
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Regedit01 wrote:I use eggdrop 1.6.15 and all my channels have -inactive.

I just heard from my friend, GoQ, that he has the similar problem. When he tries to write the command ".say #channel text", he gets message like "I'm not on that channel". When he writes ".channel #channel", he gets that there are 0 members.
This then seems more of an issue of communication between the IRCD and eggdrop. What network are you on and which net-type did you set. Please note that some networks have disabled the /WHO command. A command eggdrop relies on.

Perhaps a tcl should be written which feeds a fake /WHO reply into eggdrop based on the /NAMES command when on such networks.
R
Regedit01

Post by Regedit01 »

I use "set net-type 1" (IRCnet) and I'm on the Polish IRC Network called PolNet (its http:// and irc:// domain is ircnet.pl).
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Regedit01 wrote:I use "set net-type 1" (IRCnet) and I'm on the Polish IRC Network called PolNet (its http:// and irc:// domain is ircnet.pl).
warszawa.ircnet.pl hybrid-7.0
Eventhough this server seems to give a valid /WHO reply, this definitely is not an IRCNET server. Try the other net-types, maybe the efnet setting.

Edit: I joined my bot to the above server and with net-type set to 1 it seems it has some difficulties indeed.
R
Regedit01

Post by Regedit01 »

I want to thank all of you for help! Especially egghead.

I changed network type to 5 (others) and now it works correctly.
Locked