LibIRCClient 1.10 Used by Probotic
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

80 line
1.7KB

  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. #ifndef INCLUDE_IRC_SESSION_H
  15. #define INCLUDE_IRC_SESSION_H
  16. #include "params.h"
  17. #include "dcc.h"
  18. #include "libirc_events.h"
  19. // Session flags
  20. #define SESSIONFL_MOTD_RECEIVED (0x00000001)
  21. #define SESSIONFL_SSL_CONNECTION (0x00000002)
  22. #define SESSIONFL_SSL_WRITE_WANTS_READ (0x00000004)
  23. #define SESSIONFL_SSL_READ_WANTS_WRITE (0x00000008)
  24. #define SESSIONFL_USES_IPV6 (0x00000010)
  25. struct irc_session_s
  26. {
  27. void * ctx;
  28. int dcc_timeout;
  29. int options;
  30. int lasterror;
  31. char incoming_buf[LIBIRC_BUFFER_SIZE];
  32. unsigned int incoming_offset;
  33. char outgoing_buf[LIBIRC_BUFFER_SIZE];
  34. unsigned int outgoing_offset;
  35. port_mutex_t mutex_session;
  36. socket_t sock;
  37. int state;
  38. int flags;
  39. char * server;
  40. char * server_password;
  41. char * realname;
  42. char * username;
  43. char * nick;
  44. char * ctcp_version;
  45. #if defined( ENABLE_IPV6 )
  46. struct in6_addr local_addr6;
  47. #endif
  48. struct in_addr local_addr;
  49. irc_dcc_t dcc_last_id;
  50. irc_dcc_session_t * dcc_sessions;
  51. port_mutex_t mutex_dcc;
  52. irc_callbacks_t callbacks;
  53. #if defined (ENABLE_SSL)
  54. SSL * ssl;
  55. #endif
  56. };
  57. #endif /* INCLUDE_IRC_SESSION_H */