Events firing multiple times

Kannkor

Ogre
Okay, so there is definitely an issue with events firing more than once, however, I cannot track it down to why. This is the information I have. I'm hoping if any other scripter has any other information, we can track it down. (At this stage, I can't even say if it's an issue with Lax or Amadeus).

This is what I do know and can reproduce.
In certain scripts, if you close the script, then reopen it, the event will now happen twice. If you close it down and reopen it, it'll happen 3 times, etc etc and continually increase.

HOWEVER, when I wrote a 5 line example, I cannot get it to reproduce this. But I have a few (slightly more complex) scripts, that I can reproduce this with every time.

So it seems like there is a time, where script level events are not getting cleared out, so when you re-attach them when the script is run again, it's now duplicating them.

I'll continue to see if I can find what is causing it.. Hoping someone else has experienced and found it.
 

Kannkor

Ogre
Are you detaching your atoms when the script ends?
Some times yes, other times no.

When I spoke with Lax, he said it doesn't matter because it will automatically detach. Which does seem to happen in a VERY simple case.

I just forcefully detached (atom atexit) and so far it seems to work. Lax said he'll look into it when he has time, but who knows how sucessful he'll be without a relative simple example of how/when it happens.
 

Kannkor

Ogre
There may be a different issue at hand here (related/unrelated).

I'm using isxim, a slightly modified IRCLib.iss

But these parts I haven't changed.
This fires (once) when it loads.
Event[IRC_NickJoinedChannel]:DetachAtom[IRC_NickJoinedChannel]
Event[IRC_NickLeftChannel]:DetachAtom[IRC_NickLeftChannel]
Code:
atom(script) IRC_NickJoinedChannel(string User, string Channel, string WhoJoined)
{
	; This event is fired every time that someone joins a channel other than 
	; the IRCUser.
	IRCOb:SendMessageToInGame["\ao${WhoJoined} has joined ${Channel.Escape}"]
}

atom(script) IRC_NickLeftChannel(string User, string Channel, string WhoLeft)
{
	; This event is fired every time that someone leaves a channel other than
	; the IRCUser.  This event is NOT fired when someone (or yourself) is KICKED
	IRCOb:SendMessageToInGame["\ao${WhoLeft} has left ${Channel.Escape}"]

}

Here is the copy/paste from the real IRC channel.
Fri [19:30] * Kannkor_IRC has joined #channel
Fri [19:33] <Kannkor_IRC> Testing
Fri [19:34] * Poulet_IRC has joined #channel
Fri [19:35] <Poulet_IRC> test
Fri [19:36] * Someone_02 has joined #channel

Here is the output from the event.
Kannkor_IRC has joined #channel
Kannkor_IRC:Testing
Poulet_IRC has joined #channel
Poulet_IRC has joined #channel
Poulet_IRC:test
Someone_02 has joined #channel
Someone_02 has joined #channel
Someone_02 has joined #channel

The regular messages aren't being duplicated, but the has joined/left are.
 

Amadeus

The Maestro
Staff member
I updated ISXIM to remove the duplicate message when someone joins the room.

I'll try to work on ISXIM some soon (or this summer) to finish adding things I meant to do originally (especially with regard to MSN messenger stuff.)
 
Top Bottom