Eggdrop 1.6.13 running on FreeBSD 5.1 Current server.
I coded a small TCL to check and see if the eggdrop is on 2 particular channels. If the eggdrop does not have the channel in it's database, it performs a "channel add" command and adds the channel. If the eggdrop does have the channel in the database, it just ignores the script.
I defined one channel (#listen) in the config file (hard coded). The other channel (#invite) was dynamically defined. It seems that every time I .rehash, the dynamically configured channel gets created/erased. If the channel existed, it gets erased. If it didn't exist, it gets created.
Is there something here that I'm missing?
Also, I'm looking to have this proc (chan_setup) run at load. I understand that I'll need to use the "bind load <flags> <mask> <proc>", but I don't know what the mask should be. I was gonna use "bind load - * chan_setup", but I'm not sure if that is correct. Any help here would be appreciated.
Code: Select all
set chan_listen "#listen"
set chan_invite "#invite"
bind evnt - rehash chan_setup
proc chan_setup {chan} {
global chan_listen chan_invite
if (![validchan $chan_invite]) {
putlog "Created channel record for $chan_invite"
channel add $chan_invite {chanmode "+nt"}
}
if (![validchan $chan_listen]) {
putlog "Created channel record for $chan_listen"
channel add $chan_listen {chanmode "+nt"}
}
}