mirror of
https://github.com/glest/glest-source.git
synced 2025-09-26 23:49:03 +02:00
- build fix for poor distros who have a hard time with libircclient (now we just include this small lib in the source tree) so no longer required as an external lib
This commit is contained in:
52
source/shared_lib/sources/libircclient/src/errors.c
Normal file
52
source/shared_lib/sources/libircclient/src/errors.c
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*/
|
||||
#include "libircclient.h"
|
||||
#include "libirc_session.h"
|
||||
|
||||
static const char * libirc_strerror[LIBIRC_ERR_MAX] =
|
||||
{
|
||||
"No error",
|
||||
"Invalid argument",
|
||||
"Host not resolved",
|
||||
"Socket error",
|
||||
"Could not connect",
|
||||
"Remote connection closed",
|
||||
"Out of memory",
|
||||
"Could not accept new connection",
|
||||
"Object not found",
|
||||
"Could not DCC send this object",
|
||||
"Read error",
|
||||
"Write error",
|
||||
"Illegal operation for this state",
|
||||
"Timeout error",
|
||||
"Could not open file",
|
||||
"IRC session terminated",
|
||||
"IPv6 not supported",
|
||||
};
|
||||
|
||||
|
||||
int irc_errno (irc_session_t * session)
|
||||
{
|
||||
return session->lasterror;
|
||||
}
|
||||
|
||||
|
||||
const char * irc_strerror (int ircerrno)
|
||||
{
|
||||
if ( ircerrno >= 0 && ircerrno < LIBIRC_ERR_MAX )
|
||||
return libirc_strerror[ircerrno];
|
||||
else
|
||||
return "Invalid irc_errno value";
|
||||
}
|
||||
|
Reference in New Issue
Block a user