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.

same problem with prioritets

Old posts that have not been replied to for several years.
Locked
f
fox17
Voice
Posts: 13
Joined: Sun Dec 01, 2002 4:47 pm
Location: Russia/Moscow

same problem with prioritets

Post by fox17 »

When my bot needs unban, then this script start work:
proc need_unban {chan type} {
global chanserv channel
putquick "PRIVMSG $chanserv :invite $chan"
putserv "JOIN $chan"
puthelp "PRIVMSG $chanserv :unban $chan me"
}
1) Invite bot
2) Bot join $chan
3) Unban bot

On first kickban, when on channel set +k (key) mode, we see this:
mode: (da|Fire_FoX) sets (-o+b TestBot *!*@atlant.vescom.ru)
kick: (TestBot) was kicked by (da|Fire_FoX)

-vescom.dal.net.ru@#TestBot- ChanServ invited TestBot into the channel.
join: (TestBot) (~TestBot@atlant.vescom.ru)
mode: (ChanServ) sets (+o TestBot)
mode: (ChanServ) sets (-b *!*@atlant.vescom.ru)
It's ok, but on second kickban
mode: (da|Fire_FoX) sets (-o+b TestBot *!*@atlant.vescom.ru)
kick: (TestBot) was kicked by (da|Fire_FoX)

-vescom.dal.net.ru@#TestBot- ChanServ invited TestBot into the channel.
mode: (ChanServ) sets (-b *!*@atlant.vescom.ru)
problem with join on channel :(

How to fix it?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Scrap the first reply, I noticed I hadn't read things properly.

The reason is because of your "JOIN" message in the script.

You have to remember that messages have to traverse a network of interconnected servers, before it finaly reaches its destination. This applies with everything from servers, to nicknames, to services.

Look at how how it needs to traverse before it reaches the destination.

JOIN - This goes to the local server, which will process the command.

PRIVMSG to chanserv - This goes to the local server, then traverses each server between the link to chanserv services.

Allthough you are sending the PRIVMSG before the JOIN, its 99% likely that the JOIN is being processed before the INVITE gets back to eggdrop.

The quickest way to solve this, is to force send the JOIN later than the PRIVMSG, possibly using a timer

Code: Select all

proc need_unban {chan type} { 
  global chanserv channel 
  putquick "PRIVMSG $chanserv :invite $chan" 
  utimer 2 [list putserv "JOIN $chan"]
  puthelp "PRIVMSG $chanserv :unban $chan me" 
}
This will wait 2 seconds before even attempting to place the message in the queue
Locked