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.

QuakeNet: channel add 'problem'

Old posts that have not been replied to for several years.
Locked
H
Hunter

QuakeNet: channel add 'problem'

Post by Hunter »

Hi there.

Got stuck again...
I'm currently creating a script which should do a channel add, post something into it and finally channel remove. I need to go that way because lots of (Clan-)channel on Quakenet are +n protected. (The scripts purpose is to allow trusted user to place a search request for a funwar opponent - no misuse for spam or ad!)

It looks like the completion of the channel add command is taking up too much time and the putserv/putquick command for the msg itself is being sent out to the chan while the bot is not yet recognized there. The msg itself is treated as an external Msg and dropped due to the +n chanmode.

Is there a proper way to get around that?

I know that the above works fine using the putserv command if the bot remain online in the channel. It would help to find out when the msg had been successfully posted so the bot may quit the channel then.

Thx for any advice.
Regards
Hunter
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Do you mean something like this?

channel add #blah
putserv "privmsg #blah :yay sheep"
channel remove #blah

?

Rather than that, you should do use a bind join to see when the bot joins the channel, then do the privmsg in the bind, then channel remove.

On the other hand, if you just want something really easy, try this:

putserv "join #blah\nprivmsg #blah :hello sheep!\npart #blah"

I think that works, but I'm not sure and I can't test right now.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

stdragon wrote:putserv "join #blah\nprivmsg #blah :hello sheep!\npart #blah"
i doubt that this works....you would have to delay it, if you dont join in 0.0000001 secs the msg wont come throught
H
Hunter

Post by Hunter »

Hi stdragon.

That's exactly what I meant.
Tested the easy way 'putserv "join #blah\nprivmsg #blah :hello sheep!\npart #blah' without success or better with the same behaviour: Bot joins and parts, no msg at all. (Phew... If it really were that easy I would have kicked myself ;) )

The 'bind join' solution sounds more interesting. I always thought monitoring a join event is only possible if the bot is already on the chan!?
Will give a try and return the result.

Thx so far. :wink:
Hunter
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

stdragon should know that eggdrop strips \n's from the queues :wink:
(except for maybe using the putdcc queue to the server idx.)
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Hi,

Ok I tested it and it didn't work. Not because of the join delay, but because putserv parses the text you send it and filters out multiple messages (anything past the first \n).

The solution is something like this:

set str "join #blah\nprivmsg #blah :baa baa\npart #blah\n"
putdccraw 0 [string length $str] $str

putdccraw does not manipulate the text at all, it just sends it. I tested this and it works, although you get a log message saying "joined #blah but didn't want to!" One way around that is to use channel add before the putdccraw... or just ignore the log message. :)
H
Hunter

Post by Hunter »

Hi!

'putdccraw' finally made it! Thanks a lot ;)
Even with channel add I am having the error msg but will fix that on my own ;)

Best Regards
Hunter
Locked