View Issue Details

IDProjectCategoryView StatusLast Update
0002674unrealmodule apipublic2005-11-09 09:37
ReporterNazzy Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformi386OSLinuxOS Version2.6
Product Version3.2.4 
Fixed in Version3.2.4 
Summary0002674: Probable redundant MyClient call
DescriptionI've not actually generated a patch yet ... I would like confirmation before I change it.

src/modules/m_svsnick.c line 122:
                        if (MyClient(acptr))
                        {
                                sendto_snomask(SNO_NICKCHANGE, "*** Notice -- %s (%s@%s) has changed his/her nickname to %s",
                                        acptr->name, acptr->user->username, acptr->user->realhost, parv[2]);

                                RunHook2(HOOKTYPE_LOCAL_NICKCHANGE, acptr, parv[2]);
                        }

since this is within the block that should only be executed on the server owning the target client, this call to MyClient() seems redundant.

If it is needed, a short explaination would be appreciated, and accept my apologies for cloging up the bugs system
If it is redundant, then I'll submit a patch :)
TagsNo tags attached.
Attached Files
3rd party modules

Activities

Nazzy

2005-11-04 02:46

reporter   ~0010630

Actually, come to think of it, the message it emits is techincally wrong ... the user didn't change his/her nick, they had it changed (by services or by an oper via services) ... this should probably be reflected in the message.

stskeeps

2005-11-04 04:45

reporter   ~0010631

The IsPerson(acptr) is irrelevant too, as we do find_person

Nazzy

2005-11-04 05:32

reporter   ~0010632

Nuked 3 IsPerson checks, acptr->name and MyClient ... also tweaked the message to be technically correct.

syzop

2005-11-04 10:57

administrator   ~0010635

*nod*.

When we are at it, the way hunt_server_token is used is just plain weird (it's also used like that on other places):

now:
if (!hunt_server_token(cptr, sptr, MSG_SVSNICK, TOK_SVSNICK, "%s %s :%s", 1, parc, parv) != HUNTED_ISME)

this seems to be A TAD more logical:
if (hunt_server_token(cptr, sptr, MSG_SVSNICK, TOK_SVSNICK, "%s %s :%s", 1, parc, parv) == HUNTED_ISME)

lol ;)

syzop

2005-11-09 09:37

administrator   ~0010681

Fixed in .394.

Issue History

Date Modified Username Field Change
2005-11-04 02:35 Nazzy New Issue
2005-11-04 02:46 Nazzy Note Added: 0010630
2005-11-04 04:45 stskeeps Note Added: 0010631
2005-11-04 05:32 Nazzy Note Added: 0010632
2005-11-04 05:33 Nazzy File Added: msvsnick_multiple_redundancies.txt
2005-11-04 10:57 syzop Note Added: 0010635
2005-11-09 09:37 syzop Status new => resolved
2005-11-09 09:37 syzop Fixed in Version => 3.2.4
2005-11-09 09:37 syzop Resolution open => fixed
2005-11-09 09:37 syzop Assigned To => syzop
2005-11-09 09:37 syzop Note Added: 0010681
2017-01-06 15:48 syzop Category module => module api