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.

is there any command like this?

Old posts that have not been replied to for several years.
Locked
Y
YaNuSH

is there any command like this?

Post by YaNuSH »

can i get the list of channels my bot is on?
i know about "channels" command, but this would only give me the
the channels that are set in the .chan file and i need the
actual chans the bots is on at a certain momet.
even the number of channels would b gr8. something like $chan(0) of mIRC.

ty...
f
fudded

Post by fudded »

the command "channels" does not just give the chans specified in hte config. It returns a list of the channels the bot is currently on.


example

[20:35] <fudded> .tcl channels
[20:35] <ins3ct> Tcl: #a*c1** #w-***ops #wa**-***y #eggdrop-**lp

I manually edited the actual return, but my bot has only one channel in its config

Fudded
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Actually, channels does only give the channels stored in the chan file. It doesn't mean the bot is ON the channel. The bot could be banned, in need of invite, etc. The chan could also be inactive.

Here's a proc that will return a list of all channels the bot is ON.

Code: Select all

proc onchannels {} {
  set chanlist [list]
  foreach chan [channels] {
    if {[botonchan $chan]} {
      lappend chanlist $chan
    }
  }
  return $chanlist
}
Wcc
Y
YaNuSH

Post by YaNuSH »

ty very much 4 the proc
however, isn't there any possibility i'm on a channel that isn't in the .chan file?
like, if i used .tcl putserv join #channel command then this channel isn't in the .chan file and then i won't b able 2 grab it with the proc u gave me
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Eggdrop only maintains records for channels jpoined using the .+chan command.

Issuing a channel join, without telling the bot you are doing it, will only confuse it, and it will automaticaly part it. This is to stop it from being in channels it shouldn't
Locked