Skip to content

Commit

Permalink
SSL Fingerprint wasn't broadcasted correctly to other servers. For Un…
Browse files Browse the repository at this point in the history
…real this only affected WHOIS since

extban +e/+I ~S:xxx worked fine (only checked locally). But this also prevented services from being
informed, IOTW: services could not make use of this new certfp feature yet.
  • Loading branch information
syzop committed Jan 3, 2016
1 parent b7a1d50 commit 208f4a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/h.h
Expand Up @@ -756,3 +756,4 @@ extern void convert_to_absolute_path(char **path, char *reldir);
extern int has_channel_mode(aChannel *chptr, char mode);
extern void start_listeners(void);
extern void buildvarstring(char *inbuf, char *outbuf, size_t len, char *name[], char *value[]);
extern void broadcast_moddata_client(aClient *acptr);
16 changes: 15 additions & 1 deletion src/moddata.c
Expand Up @@ -309,6 +309,17 @@ ModDataInfo *mdi;
}
}

/** Broadcast moddata attached to client 'acptr' to all servers. */
void broadcast_moddata_client(aClient *acptr)
{
aClient *cptr;

list_for_each_entry(cptr, &server_list, special_node)
{
send_moddata_client(cptr, acptr);
}
}

/** Send all moddata attached to channel 'chptr' to remote server 'srv' (if the module wants this), called by SJOIN */
void send_moddata_channel(aClient *srv, aChannel *chptr)
{
Expand Down Expand Up @@ -400,7 +411,10 @@ int moddata_client_set(aClient *acptr, char *varname, char *value)
memset(&moddata_client(acptr, md), 0, sizeof(ModData));
}

if (md->sync)
/* If 'sync' field is set and the user is not in pre-registered state then
* broadcast the new setting.
*/
if (md->sync && IsPerson(acptr))
{
if (value)
sendto_server(NULL, 0, 0, ":%s MD %s %s %s :%s",
Expand Down
1 change: 1 addition & 0 deletions src/modules/m_nick.c
Expand Up @@ -1528,6 +1528,7 @@ int _register_user(aClient *cptr, aClient *sptr, char *nick, char *username, cha

if (MyConnect(sptr))
{
broadcast_moddata_client(sptr);
sendto_connectnotice(sptr, 0, NULL); /* moved down, for modules. */

/* Send password from sptr->local->passwd to NickServ for identification,
Expand Down

0 comments on commit 208f4a5

Please sign in to comment.