Link data sending queue

These are old archives. They are kept for historic purposes only.
Post Reply
JanisB
Posts: 128
Joined: Fri Apr 22, 2005 9:05 am
Location: LV
Contact:

Link data sending queue

Post by JanisB »

User is trying to join channel with "JOIN #channel". Who will receive this information first? U:Lined server or regular servers or both(multithread)? Default answer "both and immediately" IMO isn't really correct :)
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

The first thing to recieve the message is the server to which the user is connected. That server then sends it on to other servers and users connected to itself where theyre in the same channel. From there it basically spans outwards. Each server then in turn sending it out to all other servers connected to it and any user in the channel in question.

So basically the server the users is connected to recieves it first. Then if services are connected to that server services get it at the same time as users connected to that server in that channel. Otherwise services only get it when it gets to services in the spanning motion.

This all happens fast so it gives the impression of immediatly.

As for which link to the server the user who sends the JOIN is connected to sends to first i have no idea but i would assume there isnt any particular order.

Sorry if ive told you more then you wanted or something you already knew, just thought it was best for the sake of others as well to explain as much as possible.
JanisB
Posts: 128
Joined: Fri Apr 22, 2005 9:05 am
Location: LV
Contact:

Post by JanisB »

Sure, I understand that FIRST server that get this info is server where user is connected :)

Why i am asking - our "network" has only 1 server and 1 services server. Services don't have "untakeover/enforce akick" options. If user, say, with `+ao` rights on channel got banned by abusive `+o`, the only thing that he can do - "/cs invite #chan", after that get +ao from services and remove ban/abuser from channel. But, if _after_ join-after-invite and _before_ +ao this user will be kicked by abuser - nothnig can help him, except opers. So, the question is - will always services be able to change user mode before the same information (about user join event) will be transmitted to another regular users? In this situation we think that services will never lag and users are connected to same server.
SpaceDoG
Posts: 301
Joined: Mon Feb 27, 2006 5:44 am
Contact:

Post by SpaceDoG »

JanisB I think I partially grasp what you are trying to say JanisB and here's my thoughts.

The user that has +ao should tell ChanServ to deop the abusive individual and then unban them. Then they can rejoin and the abusive person is no longer an op in the room :-p
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

The problem youre describing is your classic race conditions. Most services packages have features to allow ChanServ to fix things that happen as a result of a race. So im surprised you say yours hasnt.

Also what SpaceDoG says is better practice in that sort of situation.
JanisB
Posts: 128
Joined: Fri Apr 22, 2005 9:05 am
Location: LV
Contact:

Post by JanisB »

Our services are "reduced" version of Sux-Services.
SpaceDoG, thank you for possible problem solution, but i was asked exactly about data sending sequence because i don't have UnrealIRCd sources to check this.

UPDATED.
OKOK, i was downloaded sources. So, the correct answer is: JOIN->sendto_channel_butserv->sendto_serv_butone_token_opt(for each serv_fdlist.entry->send JOIN)
Unreal don't change serv_fdlist entries for different linked server types(U:Lined/normal), that means data will be broadcasted 1) to all local users and 2) to linked servers in server linking order. Thans :)
Post Reply