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.

channel set binds?

Old posts that have not been replied to for several years.
Locked
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

channel set binds?

Post by metroid »

I was wondering.
When you use channel set #channel +inactive the bot will part straight away.
Same goes for all the other channel settings.

Is there a way to bind to detect for these channel settings so the eggdrop knows if they are being set?
If so, how does it work?

If anyone knows the answer to this i'd be most gratefull as i've been looking for a way to make my bot react straight away when i set a custom channel setting
Last edited by metroid on Sat May 21, 2005 9:02 am, edited 1 time in total.
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

Post by sKy »

i hope i understand your question right :/

If you type:
.tcl channel set #channel +inactive
The bot will part. That`s normal.

To detect such channels you can use
channel get $channel inactive

Code: Select all

if { [channel get $channel inactive] } { # channel is inactive, your stuff here }
To detect all this channels you can try:

Code: Select all

foreach channel [channels] {
 if { [channel get $channel inactive] } { putlog $channel }
}
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

No, you didn't understand my question. The channel set +inactive was just an example. It's about the fact that the bot detects it being set, and i need to know how.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

are you searching for validchan?

Code: Select all

  validchan <channel>
    Description: checks if the bot has a channel record for the specified
      channel. Note that this does not necessarily mean that the bot is ON
      the channel.
    Returns: 1 if the channel exists, 0 if not
    Module: channels
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

..
Last edited by metroid on Sat May 21, 2005 1:10 pm, edited 1 time in total.
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

Post by sKy »

I read every word, but it was not easy to understand.

No there is actual no way to bind channel set events. I doub`t that someone will be added in the feature too.

but you can:
- unbind the commands and use your own processing of that
- rename the procsnames, make new proc with original name, put your own stuff inside and call at least the renamed proc
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Nevermind, a friend of mine suggested to rewrite the channel proc and make it work from there. And that appears to work.
Locked