X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Firc-encoding.c;h=7b7121b1ac4f7ecdded062b2192d1ceafb2d5e7a;hb=f8f7f83f5a2228bb9deeb8324be015cd76b84ced;hp=b1d3a697ca0b55c0e3f9bc858fe5b0c3c534d8a1;hpb=46b0eef721b9b3eec37d29aff65b6a7fc488a887;p=ngircd-alex.git diff --git a/src/ngircd/irc-encoding.c b/src/ngircd/irc-encoding.c index b1d3a697..7b7121b1 100644 --- a/src/ngircd/irc-encoding.c +++ b/src/ngircd/irc-encoding.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-2014 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 @@ -16,7 +16,8 @@ * IRC encoding commands */ -#include "imp.h" +#ifdef ICONV + #include #include @@ -28,11 +29,8 @@ #include "parse.h" #include "tool.h" -#include "exp.h" #include "irc-encoding.h" -#ifdef ICONV - /** * Handler for the IRC+ "CHARCONV" command. * @@ -48,15 +46,11 @@ IRC_CHARCONV(CLIENT *Client, REQUEST *Req) assert (Client != NULL); assert (Req != NULL); - if (Req->argc != 1) - return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, - Client_ID(Client), Req->command); - strlcpy(encoding, Req->argv[0], sizeof(encoding)); ngt_UpperStr(encoding); if (!Conn_SetEncoding(Client_Conn(Client), encoding)) - return IRC_WriteStrClient(Client, ERR_IP_CHARCONV_MSG, + return IRC_WriteErrClient(Client, ERR_IP_CHARCONV_MSG, Client_ID(Client), encoding); return IRC_WriteStrClient(Client, RPL_IP_CHARCONV_MSG,