View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002878 | unreal | ircd | public | 2006-04-09 18:55 | 2006-04-10 09:12 |
| Reporter | Trocotronic | Assigned To | |||
| Priority | normal | Severity | tweak | Reproducibility | random |
| Status | closed | Resolution | no change required | ||
| Product Version | 3.2.5 | ||||
| Summary | 0002878: +f sent to channel many times | ||||
| Description | I had a problem for many month with +f. My services send the channel modes when anyone joins. If +f is those, I could see how ChanServ was setting +f again, and again and again. Accuring the code, I found this line: if (chptr->mode.floodprot && !memcmp(chptr->mode.floodprot, &newf, sizeof(ChanFloodProt))) on m_mode.c Moreover, in m_sjoin.c I found a comment from you /* Checks if 2 ChanFloodProt modes (chmode +f) are different. * This is a bit more complicated than 1 simple memcmp(a,b,..) because * counters are also stored in this struct so we have to do * it manually :( -- Syzop. */ static int compare_floodprot_modes(ChanFloodProt *a, ChanFloodProt *b) So I decided to change memcmp from m_mode.c to this function. if (chptr->mode.floodprot && !compare_floodprot_modes(chptr->mode.floodprot, &newf)) And voilĂ ! Fixed. | ||||
| 3rd party modules | |||||
|
|
I find it hard to believe that would've fixed it, for two reasons: 1) If it were from services, unreal doesn't suppress "pointless" mode changes. (That makes it tons easier to resynch channels after a Netsplit From Hell, for example.) So you should've been seeing +f get set anyway. 2) That function is declared static. Which makes it effectively private to m_sjoin.c/m_sjoin.(s)o. Which means m_mode.c/(s)o can't reference it. Which means m_mode.c/(s)o *should* fail to link or load (if you even get past compiling it since there is no declaration in any of the headers for it either). |
|
|
1) Yes, +f would be resynched anyway. This fix only avoids sendto_channel. 2) Obviously, I copied this function from m_sjoin to m_mode |
|
|
It's what aquanight said: 'If it were from services, unreal doesn't suppress "pointless" mode changes. (That makes it tons easier to resynch channels after a Netsplit From Hell, for example.)' Incidently, when I had to install another ircd (bahamut I think), I noticed the same behavior, so it's not like we - Unreal - have some kind of weird attitude regarding this. So I guess you would need to fix your services, somehow I don't understand why you would send a +f MODE on every user join, that sounds like a real waste. If services want to prevent sending duplicate modes (which you usually want), then you should maintain channel state in memory such as knowing what modes are set, what their parameters are, and if needed.. who is banned, exempted, etc.. With regards to that, we don't allow services to "play dumb" ;). Well, I'm sure you get the idea.. :P |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-04-09 18:55 | Trocotronic | New Issue | |
| 2006-04-09 23:03 | aquanight | Note Added: 0011503 | |
| 2006-04-10 04:06 | Trocotronic | Note Added: 0011506 | |
| 2006-04-10 09:12 | syzop | Status | new => closed |
| 2006-04-10 09:12 | syzop | Note Added: 0011515 | |
| 2006-04-10 09:12 | syzop | Resolution | open => no change required |