LibIRCClient 1.10 Used by Probotic
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.

vor 10 Monaten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com
  3. *
  4. * This library is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU Lesser General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  12. * License for more details.
  13. */
  14. static const char * libirc_strerror[LIBIRC_ERR_MAX] =
  15. {
  16. "No error",
  17. "Invalid argument",
  18. "Host not resolved",
  19. "Socket error",
  20. "Could not connect",
  21. "Remote connection closed",
  22. "Out of memory",
  23. "Could not accept new connection",
  24. "Object not found",
  25. "Could not DCC send this object",
  26. "Read error",
  27. "Write error",
  28. "Illegal operation for this state",
  29. "Timeout error",
  30. "Could not open file",
  31. "IRC session terminated",
  32. "IPv6 not supported",
  33. "SSL not supported",
  34. "SSL initialization failed",
  35. "SSL connection failed",
  36. "SSL certificate verify failed",
  37. };
  38. int irc_errno (irc_session_t * session)
  39. {
  40. return session->lasterror;
  41. }
  42. const char * irc_strerror (int ircerrno)
  43. {
  44. if ( ircerrno >= 0 && ircerrno < LIBIRC_ERR_MAX )
  45. return libirc_strerror[ircerrno];
  46. else
  47. return "Invalid irc_errno value";
  48. }