Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "xchat-plugin.h"
- #include <stdio.h>
- #include <string.h>
- #include <time.h>
- #define PNAME "SNOT-FILTER"
- #define PDESC "Unreal/Anope SNOTICE FILTER"
- #define PVERSION "0.2"
- static xchat_plugin *ph;
- static xchat_hook *who_hook;
- static xchat_hook *unhook;
- static const char *clientTab = "-Clients";
- static const char *clientWhoCmd = "who +n-m * S";
- static const char *helpoptab = "-HelpOp";
- static const char *HelpOp = "HelpOp";
- static const char *helpopWhoCmd = "who +m-m h S";
- static const char *chatops = "ChatOps";
- static const char *chatopsTab = "-ChatOps";
- static const char *chatopsWhoCmd = "who +m-m oO S";
- static const char *adchat = "AdminChat";
- static const char *adchatTab = "-AdChat";
- static const char *adchatWhoCmd = "who +m-m aA S";
- static const char *locops = "LocOps";
- static const char *locopsTab = "-LocOps";
- static const char *locopsWhoCmd = "who +m-m o S";
- static const char *nachat = "NetAdmin.Chat";
- static const char *nachatTab = "-NAChat";
- static const char *nachatWhoCmd = "who +m-m N S";
- static const char *globops = "Global";
- static const char *globopsTab = "-GlobOps";
- static const char *globopsWhoCmd = "who +m o";
- static const char *idleTab = "-Idle";
- static const char *idleWhoCmd = "who +i *";
- static const char *whatTab;
- static const char *whoCmd;
- time_t whoStart, whoEnd;
- int whoCounter = 0;
- char clients[20000];
- /* Server notices */
- static int snotice_cb (char *word[], char *word_eol[], void *userdata);
- /* Who command hook */
- static int who_cmd_cb (char *word[], char *word_eol[], void *userdata);
- /* Who list data */
- static int who_list_cb (char *word[], char *word_eol[], void *userdata);
- /* End of Who List unhooks everything */
- static int unhook_who_cb (char *word[], char *word_eol[], void *userdata);
- /* Blocks certain raw server notices when tabs are open */
- static int block_raws_cb (char *word[], char *word_eol[], void *userdata);
- /* Blocks several text events from printing in -Clients tab */
- static int block_prints_cb (char *word[], void *userdata);
- /* Converts to correct command depending on the channel */
- static int helpop_cmd_cb (char *word[], char *word_eol[], void *userdata);
- /* Needed for -Idle tab command handler */
- static int idle_cmd_cb (char *word[], char *word_eol[], void *userdata);
- /* Joins to fake channel tabs and prints message */
- void print_shit (char *word[], char *word_eol[]);
- /* Creates queries and prints server notices */
- void print_to_query (char *tab, char *type, char *msg);
- /* Helps prevent /who command flooding */
- static int check_time ();
- /* Updates Userlists of fake tabs that are opened */
- void update_userlist ();
- static int searchText (char *text, const char *nicks);
- static int is_hilight (char *text);
- void xchat_plugin_get_info(char **name, char **desc, char **version, void **reserved)
- {
- *name = PNAME;
- *desc = PDESC;
- *version = PVERSION;
- }
- int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name,
- char **plugin_desc, char **plugin_version, char *arg)
- {
- ph = plugin_handle;
- *plugin_name = PNAME;
- *plugin_desc = PDESC;
- *plugin_version = PVERSION;
- xchat_hook_server(ph, "NOTICE", XCHAT_PRI_NORM, snotice_cb, NULL);
- xchat_hook_command(ph, "who", XCHAT_PRI_NORM, who_cmd_cb, NULL, NULL);
- xchat_hook_command(ph, "", XCHAT_PRI_NORM, helpop_cmd_cb, NULL, NULL);
- xchat_hook_command(ph, "notinchan", XCHAT_PRI_NORM, idle_cmd_cb, NULL, NULL);
- xchat_hook_server(ph, "401", XCHAT_PRI_NORM, block_raws_cb, NULL);
- xchat_hook_server(ph, "403", XCHAT_PRI_NORM, block_raws_cb, NULL);
- xchat_hook_server(ph, "334", XCHAT_PRI_NORM, block_raws_cb, NULL);
- xchat_hook_print(ph, "Users On Channel", XCHAT_PRI_NORM, block_prints_cb, NULL);
- xchat_hook_print(ph, "Part", XCHAT_PRI_NORM, block_prints_cb, NULL);
- xchat_hook_print(ph, "Change Nick", XCHAT_PRI_NORM, block_prints_cb, NULL);
- xchat_hook_print(ph, "Quit", XCHAT_PRI_NORM, block_prints_cb, NULL);
- whoStart = time(NULL);
- xchat_print(ph, "SNOTICES DEBUG LOADED");
- return XCHAT_EAT_XCHAT;
- }
- static int snotice_cb (char *word[], char *word_eol[], void *userdata)
- {
- static const char *currentServer;
- static const char *yourNickname;
- if (strcmp(word[5], "Notice") == 0) // Notice --
- {
- if (strcmp(word[7], "Client") == 0) // Clients
- {
- whatTab = clientTab;
- whoCmd = clientWhoCmd;
- char *userHost, *nickName, *userAddress;
- currentServer = xchat_get_info(ph, (char*)"server");
- yourNickname = xchat_get_info(ph, (char*)"nick");
- char type[100], text[100];
- if (strcmp(word[9], "at") == 0) /* Remote */
- {
- /* Connect */
- if (strcmp(word[8], "connecting") == 0)
- {
- nickName = word[11];
- userHost = word[12];
- sprintf(type, "%s", "\002\0033[C]");
- xchat_commandf(ph, "recv :%s 353 %s = %s :%s",
- currentServer, yourNickname, whatTab, nickName);
- }
- else /* Exit */
- {
- userAddress = word[11];
- nickName = strdup(userAddress);
- userHost = strrchr(nickName, '!');
- *userHost++ = '\0';
- sprintf(type, "%s", "\002\0032[E]");
- xchat_commandf(ph, "recv :%s!meow@blah.com PART %s",
- nickName, whatTab);
- }
- }
- else /* local */
- {
- if (strcmp(word[8], "connecting") == 0) /* Connect */
- {
- nickName = word[12];
- userHost = word[13];
- sprintf(type, "%s", "\002\0033[C]");
- xchat_commandf(ph, "recv :%s 353 %s = %s :%s",
- currentServer, yourNickname, whatTab, nickName);
- }
- else /* Exit */
- {
- nickName = word[9];
- userHost = word[10];
- sprintf(type, "%s", "\002\0032[E]");
- xchat_commandf(ph, "recv :%s!meow@blah.com PART %s",
- nickName, whatTab);
- }
- }
- sprintf(text, "\002%s\017 %s", nickName, userHost);
- if (!xchat_find_context(ph, currentServer, whatTab))
- {
- if (check_time() == 1)
- {
- xchat_commandf(ph, "TIMER 1 %s", whoCmd);
- }
- xchat_commandf(ph, "RECV :%s!blah@blah.net JOIN :%s",
- yourNickname, whatTab);
- }
- xchat_set_context(ph, xchat_find_context(ph, currentServer, clientTab));
- xchat_emit_print(ph, "Channel Message", type, text, NULL, NULL);
- xchat_command(ph, "GUI COLOR 0");
- return XCHAT_EAT_XCHAT;
- }
- else if (strcmp(word[9], "has") == 0) /* Nick change */
- {
- char msg[100];
- if (strcmp(word[13], "to") == 0) /* not forced nick change */
- {
- sprintf(msg, "is now \002%s\017 %s", word[14], word[8]);
- xchat_commandf(ph, "RECV :%s!blah.net NICK :%s", word[7], word[14]);
- print_to_query("-NickChange", word[7], msg);
- return XCHAT_EAT_XCHAT;
- }
- else /* Forced nick change */
- {
- sprintf(msg, "is now \002%s\017 %s", word[17], word[8]);
- xchat_commandf(ph, "RECV :%s!blah.net NICK :%s", word[7], word[17]);
- print_to_query("-NickChange", word[7], msg);
- return XCHAT_EAT_XCHAT;
- }
- return XCHAT_EAT_NONE;
- }
- /* Network Crap */
- else if (strcmp(word[7], "(link)") == 0 ||
- strcmp(word[7], "Possible") == 0 ||
- strcmp(word[7], "Link") == 0)
- {
- print_to_query("-Global", word[7], word_eol[8]);
- return XCHAT_EAT_XCHAT;
- }
- else if (strcmp(word[7], "TS") == 0) /* TS Control */
- {
- print_to_query("-Services", "TS Control", word_eol[10]);
- return XCHAT_EAT_XCHAT;
- }
- return XCHAT_EAT_NONE;
- }
- else if (strcmp(HelpOp, word[5]) == 0) /* HelpOp */
- {
- whatTab = helpoptab;
- whoCmd = helpopWhoCmd;
- print_shit(word, word_eol);
- }
- else if (strcmp(chatops, word[5]) == 0) /* ChatOps */
- {
- whatTab = chatopsTab;
- whoCmd = chatopsWhoCmd;
- print_shit(word, word_eol);
- }
- else if (strcmp(adchat, word[5]) == 0) /* AdChat */
- {
- whatTab = adchatTab;
- whoCmd = adchatWhoCmd;
- print_shit(word, word_eol);
- }
- else if (strcmp(nachat, word[5]) == 0) /* NAChat */
- {
- whatTab = nachatTab;
- whoCmd = nachatWhoCmd;
- print_shit(word, word_eol);
- }
- else if (strcmp(locops, word[5]) == 0) /* LocOps */
- {
- whatTab = locopsTab;
- whoCmd = locopsWhoCmd;
- print_shit(word, word_eol);
- }
- /* Global */
- else if (strcmp(globops, word[5]) == 0 && strcmp("--", word[6]) == 0)
- {
- char *text, *nick, *text2, *server;
- char *nickName, *meh, *blah;
- meh = word[8];
- nickName = strdup(meh);
- blah = strrchr(nickName, ':');
- if (blah)
- {
- *blah++ = '\0';
- }
- text = strdup(nickName);
- text2 = strdup(nickName);
- nick = strrchr(text, 'S');
- server = strrchr(text2, '.');
- /* Global server notice */
- if (server &&
- (strcmp(server, ".net") == 0 ||
- strcmp(server, ".com") == 0 ||
- strcmp(server, ".org") == 0))
- {
- print_to_query("-Services", nickName, word_eol[9]);
- }
- /* Anope Services message */
- else if (nick && strcmp(nick, "Serv") == 0)
- {
- print_to_query("-Services", nickName, word_eol[9]);
- }
- else /* If opers are actually communicating */
- {
- whatTab = globopsTab;
- whoCmd = globopsWhoCmd;
- print_shit(word, word_eol);
- }
- return XCHAT_EAT_XCHAT;
- }
- /* Need to test these */
- else if (strcmp("Stats", word[4]) == 0 ||
- strcmp("Forbidding", word[4]) == 0 ||
- strcmp("Failed", word[4]) == 0 ||
- strcmp("[Spamfilter]", word[4]) == 0 ||
- strcmp("(link)", word[4]) == 0 ||
- strcmp("(sync)", word[4]) == 0)
- {
- print_to_query("-Global", word[4], word_eol[5]);
- return XCHAT_EAT_NONE;
- }
- /* Need to test */
- else if (strcmp("OperOverride", word[5]) == 0 ||
- strcmp("Flood", word[5]) == 0)
- {
- print_to_query("-Global", word[5], word_eol[7]);
- return XCHAT_EAT_NONE;
- }
- /* Need to test */
- else if (strcmp("Spamfilter", word[5]) == 0) /* Spamfilter */
- {
- print_to_query("-Global", word[5], word_eol[6]);
- return XCHAT_EAT_NONE;
- }
- /* Expired & Permament Bans */
- else if (strcmp("Expiring", word[5]) == 0 || strcmp("Permanent", word[5]) == 0)
- {
- print_to_query("-Bans", word[5], word_eol[6]);
- }
- else if (strcmp("removed", word[5]) == 0) /* Removed Bans */
- {
- print_to_query("-Bans", "Removed", word_eol[4]);
- }
- /* Added Server Bans */
- else if (strcmp("added", word[6]) == 0 && strcmp("for", word[7]) == 0)
- {
- print_to_query("-Bans", "Added", word_eol[5]);
- }
- /* Added Global Server Bans */
- else if (strcmp("added", word[7]) == 0 && strcmp("for", word[8]) == 0)
- {
- print_to_query("-Bans", "Added", word_eol[5]);
- }
- else if (strcmp("did a /whois on you.", word_eol[7]) == 0) /* whois */
- {
- print_to_query("-Global", word[5], word_eol[7]);
- }
- /* When people oper up */
- else if (strcmp("is", word[7]) == 0 && strcmp("now", word[8]) == 0)
- {
- if (check_time() == 1)
- {
- update_userlist();
- }
- print_to_query("-Global", "Oper", word_eol[5]);
- }
- else if (strcmp("KILL", word_eol[8]) == 0) /* Kills */
- {
- print_to_query("-Bans", "Kill", word_eol[9]);
- }
- else
- {
- return XCHAT_EAT_NONE;
- }
- return XCHAT_EAT_XCHAT;
- }
- static int idle_cmd_cb (char *word[], char *word_eol[], void *userdata)
- {
- whatTab = idleTab;
- whoCmd = idleWhoCmd;
- static const char *yourNickname;
- yourNickname = xchat_get_info(ph, (char*)"nick");
- xchat_commandf(ph, "RECV :%s!blah@blah.net JOIN :%s",
- yourNickname, whatTab);
- xchat_commandf(ph, "TIMER 1 %s", whoCmd);
- if (who_hook != NULL)
- {
- xchat_unhook(ph, who_hook);
- who_hook = NULL;
- }
- who_hook = xchat_hook_server(ph, "352", XCHAT_PRI_NORM, who_list_cb, NULL);
- return XCHAT_EAT_NONE;
- }
- static int who_cmd_cb (char *word[], char *word_eol[], void *userdata)
- {
- if ((strcmp(clientWhoCmd, word_eol[1]) == 0) ||
- (strcmp(locopsWhoCmd, word_eol[1]) == 0) ||
- (strcmp(helpopWhoCmd, word_eol[1]) == 0) ||
- (strcmp(nachatWhoCmd, word_eol[1]) == 0) ||
- (strcmp(adchatWhoCmd, word_eol[1]) == 0) ||
- (strcmp(chatopsWhoCmd, word_eol[1]) == 0)||
- (strcmp(globopsWhoCmd, word_eol[1]) == 0))
- {
- if (who_hook != NULL)
- {
- xchat_unhook(ph, who_hook);
- who_hook = NULL;
- }
- who_hook = xchat_hook_server(ph, "352", XCHAT_PRI_NORM, who_list_cb, NULL);
- }
- return XCHAT_EAT_NONE;
- }
- static int who_list_cb (char *word[], char *word_eol[], void *userdata)
- {
- if (who_hook && strcmp(whatTab, idleTab) != 0)
- {
- clients[0] = ':';
- strcat(clients, word[8]);
- strcat(clients, " ");
- if (unhook != NULL)
- {
- xchat_unhook(ph, unhook);
- unhook = NULL;
- }
- unhook = xchat_hook_server(ph, "315", XCHAT_PRI_NORM, unhook_who_cb, NULL);
- }
- else if (who_hook && strcmp(whatTab, idleTab) == 0 && word[4][0] != '#')
- {
- clients[0] = ':';
- strcat(clients, word[8]);
- strcat(clients, " ");
- if (unhook != NULL)
- {
- xchat_unhook(ph, unhook);
- unhook = NULL;
- }
- unhook = xchat_hook_server(ph, "315", XCHAT_PRI_NORM, unhook_who_cb, NULL);
- }
- return XCHAT_EAT_XCHAT;
- }
- static int unhook_who_cb (char *word[], char *word_eol[], void *userdata)
- {
- xchat_unhook(ph, who_hook);
- static const char *currentServer;
- static const char *yourNickname;
- currentServer = xchat_get_info(ph, (char*)"server");
- yourNickname = xchat_get_info(ph, (char*)"nick");
- xchat_commandf(ph, "RECV :%s 353 %s = %s %s",
- currentServer, yourNickname, whatTab, clients);
- sprintf(clients, "%s", ":");
- xchat_unhook(ph, unhook);
- return XCHAT_EAT_XCHAT;
- }
- static int helpop_cmd_cb (char *word[], char *word_eol[], void *userdata)
- {
- static const char *currentTab;
- currentTab = xchat_get_info(ph, (char*)"channel");
- if (currentTab[0] == '-')
- {
- if (strcmp(currentTab, helpoptab) == 0)
- {
- xchat_commandf(ph, "helpop :%s", word_eol[1]);
- }
- else if (strcmp(currentTab, chatopsTab) == 0)
- {
- xchat_commandf(ph, "chatops :%s", word_eol[1]);
- }
- else if (strcmp(currentTab, adchatTab) == 0)
- {
- xchat_commandf(ph, "adchat :%s", word_eol[1]);
- }
- else if (strcmp(currentTab, nachatTab) == 0)
- {
- xchat_commandf(ph, "nachat :%s", word_eol[1]);
- }
- else if (strcmp(currentTab, locopsTab) == 0)
- {
- xchat_commandf(ph, "locops :%s", word_eol[1]);
- }
- else if (strcmp(currentTab, globopsTab) == 0)
- {
- xchat_commandf(ph, "globops :%s", word_eol[1]);
- }
- else /* Blocks -Queries too */
- {
- xchat_printf(ph, "You cannot talk in %s", currentTab);
- }
- }
- else
- {
- return XCHAT_EAT_NONE;
- }
- return XCHAT_EAT_XCHAT;
- }
- /* Joins the fake channel to communicate with opers */
- void print_shit (char *word[], char *word_eol[])
- {
- static const char *currentServer;
- static const char *yourNickname;
- currentServer = xchat_get_info(ph, (char*)"server");
- yourNickname = xchat_get_info(ph, (char*)"nick");
- if (!xchat_find_context(ph, currentServer, whatTab))
- {
- xchat_commandf(ph, "RECV :%s!blah@blah.net JOIN :%s",
- yourNickname, whatTab);
- xchat_commandf(ph, "TIMER 1 %s", whoCmd);
- }
- if (strcmp(whatTab, helpoptab) == 0)
- {
- char *nickName;
- nickName = word[8];
- xchat_set_context(ph, xchat_find_context(ph, currentServer, whatTab));
- if (strcmp("me", word[10]) == 0)
- {
- if (strcmp(yourNickname, nickName) == 0)
- {
- xchat_emit_print(ph, "Your Action", nickName, word_eol[11], NULL, NULL);
- }
- else if (is_hilight(word_eol[11]))
- {
- xchat_emit_print(ph, "Channel Action Hilight", nickName, word_eol[11], NULL, NULL);
- xchat_command(ph, "GUI COLOR 2");
- }
- else
- {
- xchat_emit_print(ph, "Channel Action", nickName, word_eol[11], NULL, NULL);
- }
- }
- else
- {
- if (strcmp(yourNickname, nickName) == 0)
- {
- xchat_emit_print(ph, "Your Message", nickName, word_eol[10], NULL, NULL);
- }
- else if (is_hilight(word_eol[10]))
- {
- xchat_emit_print(ph, "Channel Msg Hilight", nickName, word_eol[10], NULL, NULL);
- xchat_command(ph, "GUI COLOR 2");
- }
- else
- {
- xchat_emit_print(ph, "Channel Message", nickName, word_eol[10], NULL, NULL);
- }
- }
- }
- else
- {
- char *nickName, *meh, *blah;
- meh = word[8];
- nickName = strdup(meh);
- blah = strrchr(nickName, ':');
- if (blah)
- {
- *blah++ = '\0';
- }
- xchat_set_context(ph, xchat_find_context(ph, currentServer, whatTab));
- if (strcmp("me", word[9]) == 0)
- {
- if (strcmp(yourNickname, nickName) == 0)
- {
- xchat_emit_print(ph, "Your Action", nickName, word_eol[10], NULL, NULL);
- }
- else if (is_hilight(word_eol[10]))
- {
- xchat_emit_print(ph, "Channel Action Hilight", nickName, word_eol[10], NULL, NULL);
- xchat_command(ph, "GUI COLOR 2");
- }
- else
- {
- xchat_emit_print(ph, "Channel Action", nickName, word_eol[10], NULL, NULL);
- }
- }
- else
- {
- if (strcmp(yourNickname, nickName) == 0)
- {
- xchat_emit_print(ph, "Your Message", nickName, word_eol[9], NULL, NULL);
- }
- else if (is_hilight(word_eol[9]))
- {
- xchat_emit_print(ph, "Channel Msg Hilight", nickName, word_eol[9], NULL, NULL);
- xchat_command(ph, "GUI COLOR 2");
- }
- else
- {
- xchat_emit_print(ph, "Channel Message", nickName, word_eol[9], NULL, NULL);
- }
- }
- }
- }
- static int is_hilight (char *text)
- {
- int i;
- const char *str;
- if (xchat_get_prefs(ph, "irc_extra_hilight", &str, &i) == 1)
- {
- if (searchText(text, str))
- {
- return 1;
- }
- }
- return 0;
- }
- static int searchText (char *text, const char *nicks)
- {
- char *S;
- const char *n;
- if (nicks == NULL)
- {
- return 0;
- }
- S = strdup(nicks);
- n = strtok(S, ",");
- while (n != NULL)
- {
- if((strstr(text, n)))
- {
- return 1;
- }
- n = strtok (NULL, ",");
- }
- return 0;
- }
- void print_to_query (char *tab, char *type, char *msg)
- {
- static const char *currentServer;
- currentServer = xchat_get_info(ph, (char*)"server");
- if (!xchat_find_context(ph, currentServer, tab))
- {
- xchat_commandf(ph, "QUERY -nofocus %s", tab);
- }
- xchat_set_context(ph, xchat_find_context(ph, currentServer, tab));
- xchat_emit_print(ph, "Private Message to Dialog", type, msg, NULL, NULL);
- }
- /* For when a fake channel tab is open */
- static int block_raws_cb (char *word[], char *word_eol[], void *userdata)
- {
- static const char *currentServer;
- currentServer = xchat_get_info(ph, (char*)"server");
- if (xchat_find_context(ph, currentServer, clientTab) ||
- xchat_find_context(ph, currentServer, idleTab) ||
- xchat_find_context(ph, currentServer, helpoptab) ||
- xchat_find_context(ph, currentServer, adchatTab) ||
- xchat_find_context(ph, currentServer, nachatTab) ||
- xchat_find_context(ph, currentServer, locopsTab) ||
- xchat_find_context(ph, currentServer, chatopsTab)||
- xchat_find_context(ph, currentServer, globopsTab))
- {
- return XCHAT_EAT_XCHAT;
- }
- return XCHAT_EAT_NONE;
- }
- /* Keeps -Clients tab clean */
- static int block_prints_cb (char *word[], void *userdata)
- {
- static const char *currentChannel;
- currentChannel = xchat_get_info(ph, (char*)"channel");
- if (strcmp(word[1], clientTab) == 0 || strcmp(currentChannel, clientTab) == 0)
- {
- return XCHAT_EAT_XCHAT;
- }
- return XCHAT_EAT_NONE;
- }
- static int check_time()
- {
- double timeDiff;
- whoCounter++;
- whoEnd = time(NULL);
- timeDiff = difftime(whoEnd, whoStart);
- /* When 2 to 3 have opered within 2 seconds */
- if (timeDiff >= 2.0 && whoCounter <= 3)
- {
- whoCounter = 0;
- return 1;
- }
- whoStart = time(NULL);
- return 0;
- }
- void update_userlist ()
- {
- static const char *currentServer;
- currentServer = xchat_get_info(ph, (char*)"server");
- if (xchat_find_context(ph, currentServer, helpoptab))
- {
- xchat_commandf(ph, "TIMER 1 %s", helpopWhoCmd);
- }
- if (xchat_find_context(ph, currentServer, adchatTab))
- {
- xchat_commandf(ph, "TIMER 3 %s", adchatWhoCmd);
- }
- if (xchat_find_context(ph, currentServer, nachatTab))
- {
- xchat_commandf(ph, "TIMER 6 %s", nachatWhoCmd);
- }
- if (xchat_find_context(ph, currentServer, locopsTab))
- {
- xchat_commandf(ph, "TIMER 9 %s", locopsWhoCmd);
- }
- if (xchat_find_context(ph, currentServer, chatopsTab))
- {
- xchat_commandf(ph, "TIMER 12 %s", chatopsWhoCmd);
- }
- if (xchat_find_context(ph, currentServer, globopsTab))
- {
- xchat_commandf(ph, "TIMER 15 %s", globopsWhoCmd);
- }
- }
- int xchat_plugin_deinit (void)
- {
- if (unhook != NULL)
- {
- xchat_unhook(ph, unhook);
- unhook = NULL;
- }
- if (who_hook != NULL)
- {
- xchat_unhook(ph, who_hook);
- who_hook = NULL;
- }
- xchat_print(ph, "SNOTICES UNLOADED\n");
- return XCHAT_EAT_XCHAT;
- }
Add Comment
Please, Sign In to add comment