Backport changes from epic5 to make recv_nick, sent_nick and sent_body

per-server, and apply new version of do_oops from flewid (the BX2 version). 

This means that /oops, "/query .", "/query ,", "/msg ." and "/msg ," are now
per-server, along with the $. $, and $B aliases.



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@87 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2010-06-26 08:18:34 +00:00
parent 56d5c9e643
commit 789ed916cd
10 changed files with 100 additions and 37 deletions

View File

@@ -616,8 +616,8 @@ enum FUNCTION_VALUE
SCREEN_LIST,
IRCLOG_FP,
DOING_NOTICE,
LAST_SENT_MSG_BODY,
SENT_NICK,
LAST_SENT_MSG_BODY, /* NO LONGER USED */
SENT_NICK, /* NO LONGER USED */
DLL_FUNCTIONS,
DLL_NUMERIC,

View File

@@ -678,8 +678,6 @@ extern Function_ptr *global;
#define autoreply_array (*((NickTab *)global[AUTOREPLY_ARRAY]))
#define identd (*((int *)global[IDENTD_SOCKET]))
#define doing_notice ((int) *((int *)global[DOING_NOTICE]))
#define last_sent_msg_body (*((char **)global[LAST_SENT_MSG_BODY]))
#define sent_nick (*((char **)global[SENT_NICK]))
#define default_output_function (*(void (**)(char *))global[DEFAULT_OUTPUT_FUNCTION])

View File

@@ -165,6 +165,12 @@ typedef struct
int ssl_error;
SSL* ssl_fd;
#endif
/* recv_nick: the nickname of the last person to send you a privmsg */
char *recv_nick;
/* sent_nick: the nickname of the last person to whom you sent a privmsg */
char *sent_nick;
char *sent_body;
} Server;
typedef struct ser_group_list
@@ -251,6 +257,13 @@ extern SGroup *server_group_list;
time_t get_server_awaytime (int);
void set_server_awaytime (int, time_t);
void set_server_recv_nick(int server, const char *nick);
char *get_server_recv_nick(int server);
void set_server_sent_nick(int server, const char *nick);
char *get_server_sent_nick(int server);
void set_server_sent_body(int server, const char *msg_body);
char *get_server_sent_body(int server);
void server_redirect (int, char *);
int BX_check_server_redirect (char *);
char * BX_get_server_network (int);