From c8706013f8c170dd5483658c7cdc7f84a69ea6de Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 30 Jul 2000 17:30:54 +0000 Subject: [PATCH] Moved some IRC specific server stuff to generic server stuff. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@551 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/server.h | 17 +++++++++++++++++ src/irc/core/irc-server.h | 26 ++++++++++++++------------ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/core/server.h b/src/core/server.h index 914059ba..25073379 100644 --- a/src/core/server.h +++ b/src/core/server.h @@ -18,6 +18,17 @@ typedef struct { char *ircnet; IPADDR *own_ip; + + char *password; + char *nick; + char *username; + char *realname; + + /* when reconnecting, the old server status */ + int reconnection:1; /* we're trying to reconnect */ + char *channels; + char *away_reason; + char *usermode; } SERVER_CONNECT_REC; typedef struct { @@ -25,6 +36,7 @@ typedef struct { SERVER_CONNECT_REC *connrec; time_t connect_time; /* connection time */ + time_t real_connect_time; /* time when server replied that we really are connected */ char *tag; /* tag name for addressing server */ char *nick; /* current nick */ @@ -48,6 +60,11 @@ typedef struct { void *rawlog; void *buffer; /* receive buffer */ GHashTable *module_data; + + char *version; /* server version */ + char *away_reason; + int usermode_away:1; + int banned:1; /* not allowed to connect to this server */ } SERVER_REC; extern GSList *servers, *lookup_servers; diff --git a/src/irc/core/irc-server.h b/src/irc/core/irc-server.h index 17d22869..d39823d2 100644 --- a/src/irc/core/irc-server.h +++ b/src/irc/core/irc-server.h @@ -27,21 +27,23 @@ typedef struct { IPADDR *own_ip; - /* -- IRC specific - change if you wish -- */ char *password; - char *nick, *alternate_nick; + char *nick; char *username; char *realname; - int max_cmds_at_once; - int cmd_queue_speed; - int max_kicks, max_msgs, max_modes, max_whois; - /* when reconnecting, the old server status */ int reconnection:1; /* we're trying to reconnect */ char *channels; char *away_reason; char *usermode; + + /* -- IRC specific - change if you wish -- */ + char *alternate_nick; + + int max_cmds_at_once; + int cmd_queue_speed; + int max_kicks, max_msgs, max_modes, max_whois; } IRC_SERVER_CONNECT_REC; typedef struct { @@ -50,6 +52,7 @@ typedef struct { IRC_SERVER_CONNECT_REC *connrec; time_t connect_time; /* connection time */ + time_t real_connect_time; /* time when server replied that we really are connected */ char *tag; /* tag name for addressing server */ char *nick; /* current nick */ @@ -74,18 +77,17 @@ typedef struct { void *buffer; /* receive buffer */ GHashTable *module_data; - /* -- IRC specific - change if you wish -- */ - time_t real_connect_time; /* time when we received 001-event. */ + char *version; /* server version - taken from 004 event */ + char *away_reason; + int usermode_away:1; + int banned:1; /* not allowed to connect to this server */ + /* -- IRC specific - change if you wish -- */ char *real_address; /* address the irc server gives */ - char *version; /* server version - taken from 004 event */ char *usermode; /* The whole mode string .. */ char *userhost; /* /USERHOST - set when joined to first channel */ char *last_invite; /* channel where you were last invited */ - char *away_reason; - int usermode_away:1; int server_operator:1; - int banned:1; /* not allowed to connect to this server */ int whois_coming:1; /* Mostly just to display away message right.. */ int whois_found:1; /* Did WHOIS return any entries? */