I made my own script but there's a little problem. If i request the bot, the bot checks if the [requestedchannel] is in the blocklist, if it is he quits the validation. Thats all good, but if the channel is not in the blocklist a error comes up. The bot says [APPROVED] has been approved, validation will begin in a couple seconds. thats also good, the bot joins but does not continue with request:join_chan (the next chan).
The problem is most likely due to the fact that your bot most likely hav'nt had time to gather any information about the channel by the time you call request:join_chan. The time for this may be from just a few secs for small channels, to 20secs or more for large channels (basically the time it takes to retrieve the output, and parse it, from a "WHO #channel" request).
I would probably use a timer to delay the member-check a minute or two.
A somewhat more advanced way of doing it would be to manually capturing the data of the who-request using raw bindings. Making any mistakes here might result in your bot behaving very oddly however.
nml375 wrote:The problem is most likely due to the fact that your bot most likely hav'nt had time to gather any information about the channel by the time you call request:join_chan. The time for this may be from just a few secs for small channels, to 20secs or more for large channels (basically the time it takes to retrieve the output, and parse it, from a "WHO #channel" request).
I would probably use a timer to delay the member-check a minute or two.
A somewhat more advanced way of doing it would be to manually capturing the data of the who-request using raw bindings. Making any mistakes here might result in your bot behaving very oddly however.
putserv "PRIVMSG $requestnick : \[VALIDATION\] You have operator(@)."
putserv "PRIVMSG $requestnick : [\VALIDATION\] The channel meets the requirements, the bot will stay."
chanlist will output the content of eggdrop's internal list of channel-members, it will not trigger a fetch from the server. Thus, if you call it too soon from your eggie joining a channel, you will not get a list of the channel members.
Hence, you'd need to delay that process until the internal list has been fully updated... Either using a timer, or a raw binding triggering on the numeric for "End of who".
Idea looks good, a few thoughts tho..
When working with raw-bindings, the returncode of the proc is very important, as it determines wether any further processing will be done, and bindings added with scripts trigger before those built in. If a return-value is not provided explicitly, an implicit return-value will be generated from the last executed command within the proc (in this case; catch {unbind raw - {315} request:endofwho})
Also, would'nt it be easier to keep the binding active at all times, extract the channel-name from the message body, and check wether this matches the channel you're trying to validate (in theory, the triggered binding may be from a different who-query, although very unlikely).
Still have to add proper return-values to prevent your eggie from going nuts...
doc/tcl-commands.doc wrote: (17) RAW (stackable)
bind raw <flags> <keyword> <proc>
procname <from> <keyword> <text>
Description: previous versions of Eggdrop required a special compile
option to enable this binding, but it's now standard. The keyword
is either a numeric, like "368", or a keyword, such as "PRIVMSG".
from will be the server name or the source user (depending on
the keyword); flags are ignored. The order of the arguments is
identical to the order that the IRC server sends to the bot. The
pre-processing only splits it apart enough to determine the
keyword. If the proc returns 1, Eggdrop will not process the line
any further (this could cause unexpected behavior in some cases).
Module: server
nml375 wrote:chanlist will output the content of eggdrop's internal list of channel-members, it will not trigger a fetch from the server. Thus, if you call it too soon from your eggie joining a channel, you will not get a list of the channel members.
Hence, you'd need to delay that process until the internal list has been fully updated... Either using a timer, or a raw binding triggering on the numeric for "End of who".
I was not aware of that. Learned something new <tips hat>
nml375 wrote:chanlist will output the content of eggdrop's internal list of channel-members, it will not trigger a fetch from the server. Thus, if you call it too soon from your eggie joining a channel, you will not get a list of the channel members.
Hence, you'd need to delay that process until the internal list has been fully updated... Either using a timer, or a raw binding triggering on the numeric for "End of who".
I was not aware of that. Learned something new <tips hat>
Also you can use the raw binding, with the command: /NAMES #channel
This can be done immediately on join and does not need any delay when called. It will give you the member-list of the channel from the server. Also nicks with ops and voices will have their respective operator sign infront of them.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================