Central Forums Helpbot
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]   Go Down
Print
Topic: guestchannel reinvite  (Read 1881 times)
« on: December 21, 2011, 07:22:43 PM »
Noob

View Profile


Epeen: 1
Posts: 17


ello all,

just updated to version 0.7.9 and it resolved the issues with level, symb and pb, so that's awesome. but still having this problem with guestlist reinvite. When bot restart it tells me (sometimes) "You have been reinvited to the private channel" but it never actually does so...

anyone an idea what the problem here could be?

Greetings,




Ellarisa

side note: bot still running great on my linux machine Cheesy
Logged
« Reply #1 on: December 24, 2011, 04:34:40 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


This is strange, I've looked at the reinvite code and I can't see anything really "wrong" with it, though in my experience I've never gotten the reinvite message if I accidentally or intentionally clicked the "no" button on when bot invites one of my toons to guest channel.

If the bot is able to invite you, it should be able to reinvite you.  It appears to be the same function call, and if you're getting the reinvite message, you should be getting the invitation.

If you look in the plugins directory at the file vh_PrivateGroup.cs in a text editor and scroll down to where you get sent the reinvite message, you should see:

Code:
.
.
.
                foreach (UInt32 user in users)
                {
                    this._database.ExecuteNonQuery("DELETE FROM pg WHERE user = " + user);
                    this._bot.SendPrivateMessage(user, this._bot.ColorHighlight + "You have been reinvited to the private channel");
                    this._bot.PrivateChannel.Invite(user);
                }
.
.
.

That's the only place I see the "You have been reinvited" message in the bot code.  It seems to trigger for guest channel members who are not in guest chat every 5000 seconds.  If you got sent the message, the very next thing that should happen is that you get sent the invite.  If you look elsewhere in the code, the "join", "invite", and logon trigger all use bot.PrivateChannel.Invite(user).

If you're timer code above doesn't include the bot.PrivateChannel.Invite line after the bot.SendPrivateMessage, then that would be the problem.
Logged
« Reply #2 on: December 27, 2011, 11:57:00 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


I've always been perplexed as to why this doesn't work as expected .. particularly if the bot crashes or disconnects and then nobody re-connects to the guest-chat. It seems sporadic, sometimes it works .. sometimes it doesn't .. and I have tried a few bodges to make it work better, without succeeding at fixing the original problem.

It -could- potentially be a problem with invite flood .. but that doesn't seem to occur with the 'bodges' I've created.

We'll look into it further ... !

PS. Llie .. I wondered whether it was an issue with the db table .. so used it to track people who should be On the guestchat .. since I didn't understand the original purpose for the db table .. still with mixed results. Any thoughts welcomed!
Logged
« Reply #3 on: December 28, 2011, 11:59:05 AM »
Grandmaster

View Profile
**

Epeen: 20
Posts: 3218


It's likely an issue where invites are sent out too early after reconnecting.
I suspect the chat server ignores certain packets when they come in really early.
The private message is unaffected as it goes into a separate more throttled packet queue.

I suggest trying to add a bigger delay between the moment the bot connects and the moment re-invites are sent out.
What isn't remembered never happened.
Memory is merely a record.
You just need to rewrite that record.
Logged
« Reply #4 on: December 31, 2011, 01:52:36 AM »
Noob

View Profile


Epeen: 1
Posts: 17


looks like it's as vhab says, cause when i raise the timer interval to 20 seconds it seems to work (10 seconds didn't seem to work either).
Another issue solved (for me at least  Smiley ), thanks for the help!
Greetings,



Ellarisa
Logged
« Reply #5 on: January 02, 2012, 06:19:40 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Glad to hear that seems to work .. we'll try to get that patched for future versions Smiley
Logged
Pages: [1]   Go Up
Print
Jump to: