X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-metadata.c;h=14ffe351ed6a98984a6eac0f0c8e9fc39c13e818;hp=d185488b500789af68a4a8253adc313a918d16f9;hb=904c8a4375cb9deed64007b06c6a7ba42313d93d;hpb=646a97de5fea240f8e06e1b38aa9e72ea50e0c8c diff --git a/src/ngircd/irc-metadata.c b/src/ngircd/irc-metadata.c index d185488b..14ffe351 100644 --- a/src/ngircd/irc-metadata.c +++ b/src/ngircd/irc-metadata.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,17 +52,17 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req) assert(Req != NULL); if (Req->argc != 3) - return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, + return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); prefix = Client_Search(Req->prefix); if (!prefix) - return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, + return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, Client_ID(Client), Req->prefix); target = Client_Search(Req->argv[0]); if (!target) - return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, + return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, Client_ID(Client), Req->argv[0]); LogDebug("Got \"METADATA\" command from \"%s\" for client \"%s\": \"%s=%s\".", @@ -70,7 +70,7 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req) Req->argv[1], Req->argv[2]); /* Mark client: it has receiveda a METADATA command */ - if (!strchr(Client_Flags(target), 'M')) { + if (!Client_HasFlag(target, 'M')) { snprintf(new_flags, sizeof new_flags, "%sM", Client_Flags(target)); Client_SetFlags(target, new_flags);