X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Firc.c;h=1a0d725f92eca1069805e04bc8865d0f6b0cbecc;hb=588af510a35b5b28cb8c1063ac865f86c65d7a8a;hp=9d9d3f026fcedfaf47b6475727e376acb768721e;hpb=3ee98d9f72449c88861744aebdd0a2e570bc3bc5;p=ngircd-alex.git diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c index 9d9d3f02..1a0d725f 100644 --- a/src/ngircd/irc.c +++ b/src/ngircd/irc.c @@ -304,25 +304,35 @@ IRC_TRACE( CLIENT *Client, REQUEST *Req ) } /* IRC_TRACE */ +/** + * Handler for the IRC "HELP" command. + * + * @param Client The client from which this command has been received. + * @param Req Request structure with prefix and all parameters. + * @return CONNECTED or DISCONNECTED. + */ GLOBAL bool -IRC_HELP( CLIENT *Client, REQUEST *Req ) +IRC_HELP(CLIENT *Client, REQUEST *Req) { COMMAND *cmd; - assert( Client != NULL ); - assert( Req != NULL ); + assert(Client != NULL); + assert(Req != NULL); /* Bad number of arguments? */ - if( Req->argc > 0 ) return IRC_WriteStrClient( Client, ERR_NORECIPIENT_MSG, Client_ID( Client ), Req->command ); + if (Req->argc > 0) + return IRC_WriteStrClient(Client, ERR_NORECIPIENT_MSG, + Client_ID(Client), Req->command); - cmd = Parse_GetCommandStruct( ); - while( cmd->name ) - { - if( ! IRC_WriteStrClient( Client, "NOTICE %s :%s", Client_ID( Client ), cmd->name )) return DISCONNECTED; + cmd = Parse_GetCommandStruct(); + while(cmd->name) { + if (!IRC_WriteStrClient(Client, "NOTICE %s :%s", + Client_ID(Client), cmd->name)) + return DISCONNECTED; cmd++; } - - IRC_SetPenalty( Client, 2 ); + + IRC_SetPenalty(Client, 2); return CONNECTED; } /* IRC_HELP */ @@ -457,7 +467,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors) if (nick != NULL && host != NULL) { if (strcasecmp(nick, Client_ID(cl)) == 0 && strcasecmp(user, Client_User(cl)) == 0 && - strcasecmp(host, Client_HostnameCloaked(cl)) == 0) + strcasecmp(host, Client_HostnameDisplayed(cl)) == 0) break; else continue; @@ -465,7 +475,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors) if (strcasecmp(user, Client_User(cl)) != 0) continue; if (host != NULL && strcasecmp(host, - Client_HostnameCloaked(cl)) != 0) + Client_HostnameDisplayed(cl)) != 0) continue; if (server != NULL && strcasecmp(server, Client_ID(Client_Introducer(cl))) != 0)