0 Members and 1 Guest are viewing this topic.
julien@amy:~$ xchatterminate called after throwing an instance of 'std::regex_error' what(): regex_errorAbandon
#include "xchat-plugin.h"#include <string.h>#define PNAME "OmnomIRC Integration"#define PDESC "Integrates OmnomIRC into X-Chat"#define PVERSION "0.1"static xchat_plugin *ph;static const char *omnomirc_nick = "OmnomIRC";static intmessage_cb(char *word[], void *userdata) { int i; char *res, *msg, nick[30]; if (strcmp(word[1], omnomirc_nick)) return XCHAT_EAT_NONE; msg = word[2]; res = strchr(msg, '*'); if (res != NULL && res-msg+1 < 11) { for (; msg != res; ++msg) *msg = '\x03'; *msg = '\x03'; *++msg = '6'; word[1] = "*"; return XCHAT_EAT_NONE; } for (i = 0; *msg != '>'; ++i,++msg) { if (*msg == '<') *msg = '\x03'; nick[i] = *msg; *msg = '\x03'; } *msg = '\x03'; *++msg = '\x03'; strcpy(word[1], nick); return XCHAT_EAT_NONE;}voidxchat_plugin_get_info(char **name, char **desc, char **version, void **reserved) { *name = PNAME; *desc = PDESC; *version = PVERSION;}intxchat_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_print(ph, "Channel Message", XCHAT_PRI_NORM, message_cb, NULL); xchat_print(ph, "OmnomIRC Integration loaded successfully!"); return 1;}
Looks awesome & useful! I love when things get simplified and integrated I'm not using it myself though because I like to know who's actually online :-