Some final rebranding

This commit is contained in:
Berke Viktor 2012-10-30 10:42:37 +01:00
parent 012d78b2f6
commit 82936df2af
14 changed files with 48 additions and 48 deletions

View File

@ -67,7 +67,7 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
} }
} }
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
int int

View File

@ -59,7 +59,7 @@ run_command (char *word[], char *word_eol[], void *userdata)
{ {
/*strcat (commandLine, word_eol[3]);*/ /*strcat (commandLine, word_eol[3]);*/
hexchat_printf (ph, "Printing Exec output to others is not supported yet.\n"); hexchat_printf (ph, "Printing Exec output to others is not supported yet.\n");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
else else
{ {
@ -112,7 +112,7 @@ run_command (char *word[], char *word_eol[], void *userdata)
CloseHandle (pInfo.hProcess); CloseHandle (pInfo.hProcess);
CloseHandle (pInfo.hThread); CloseHandle (pInfo.hThread);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
int int

View File

@ -100,7 +100,7 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
hexchat_commandf(ph, "PRIVMSG %s :+OK %s", channel, encrypted); hexchat_commandf(ph, "PRIVMSG %s :+OK %s", channel, encrypted);
free(encrypted); free(encrypted);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
/** /**
@ -178,7 +178,7 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
free(message); free(message);
free(sender_nick); free(sender_nick);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
decrypt_error: decrypt_error:
free(decrypted); free(decrypted);
@ -196,7 +196,7 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
// Check syntax // Check syntax
if (*word[2] == '\0') { if (*word[2] == '\0') {
hexchat_printf(ph, "%s\n", usage_setkey); hexchat_printf(ph, "%s\n", usage_setkey);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if (*word[3] == '\0') { if (*word[3] == '\0') {
@ -216,7 +216,7 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
hexchat_printf(ph, "\00305Failed to store key in blow.ini\n", nick, key); hexchat_printf(ph, "\00305Failed to store key in blow.ini\n", nick, key);
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
/** /**
@ -228,7 +228,7 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
// Check syntax // Check syntax
if (*word[2] == '\0' || *word[3] != '\0') { if (*word[2] == '\0' || *word[3] != '\0') {
hexchat_printf(ph, "%s\n", usage_delkey); hexchat_printf(ph, "%s\n", usage_delkey);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
nick = word_eol[2]; nick = word_eol[2];
@ -240,7 +240,7 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
hexchat_printf(ph, "\00305Failed to delete key in blow.ini!\n", nick); hexchat_printf(ph, "\00305Failed to delete key in blow.ini!\n", nick);
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
/** /**

View File

@ -176,7 +176,7 @@ static struct {
long value; long value;
} lxc_consts[] = { } lxc_consts[] = {
{"EAT_NONE", HEXCHAT_EAT_NONE}, {"EAT_NONE", HEXCHAT_EAT_NONE},
{"EAT_XCHAT", HEXCHAT_EAT_XCHAT}, {"EAT_XCHAT", HEXCHAT_EAT_HEXCHAT},
{"EAT_PLUGIN", HEXCHAT_EAT_PLUGIN}, {"EAT_PLUGIN", HEXCHAT_EAT_PLUGIN},
{"EAT_ALL", HEXCHAT_EAT_ALL}, {"EAT_ALL", HEXCHAT_EAT_ALL},

View File

@ -523,7 +523,7 @@ command_cb (char *word[], char *word_eol[], void *userdata)
if (SvTRUE (ERRSV)) { if (SvTRUE (ERRSV)) {
hexchat_printf (ph, "Error in command callback %s", SvPV_nolen (ERRSV)); hexchat_printf (ph, "Error in command callback %s", SvPV_nolen (ERRSV));
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */ if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
retVal = HEXCHAT_EAT_XCHAT; retVal = HEXCHAT_EAT_HEXCHAT;
} else { } else {
if (count != 1) { if (count != 1) {
hexchat_print (ph, "Command handler should only return 1 value."); hexchat_print (ph, "Command handler should only return 1 value.");
@ -1327,7 +1327,7 @@ xs_init (pTHX)
newCONSTSUB (stash, "PRI_LOWEST", newSViv (HEXCHAT_PRI_LOWEST)); newCONSTSUB (stash, "PRI_LOWEST", newSViv (HEXCHAT_PRI_LOWEST));
newCONSTSUB (stash, "EAT_NONE", newSViv (HEXCHAT_EAT_NONE)); newCONSTSUB (stash, "EAT_NONE", newSViv (HEXCHAT_EAT_NONE));
newCONSTSUB (stash, "EAT_XCHAT", newSViv (HEXCHAT_EAT_XCHAT)); newCONSTSUB (stash, "EAT_XCHAT", newSViv (HEXCHAT_EAT_HEXCHAT));
newCONSTSUB (stash, "EAT_PLUGIN", newSViv (HEXCHAT_EAT_PLUGIN)); newCONSTSUB (stash, "EAT_PLUGIN", newSViv (HEXCHAT_EAT_PLUGIN));
newCONSTSUB (stash, "EAT_ALL", newSViv (HEXCHAT_EAT_ALL)); newCONSTSUB (stash, "EAT_ALL", newSViv (HEXCHAT_EAT_ALL));
newCONSTSUB (stash, "FD_READ", newSViv (HEXCHAT_FD_READ)); newCONSTSUB (stash, "FD_READ", newSViv (HEXCHAT_FD_READ));
@ -1473,10 +1473,10 @@ perl_command_unloadall (char *word[], char *word_eol[], void *userdata)
{ {
if (my_perl != NULL) { if (my_perl != NULL) {
execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::unload_all", 0)), ""); execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::unload_all", 0)), "");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
static int static int
@ -1485,11 +1485,11 @@ perl_command_reloadall (char *word[], char *word_eol[], void *userdata)
if (my_perl != NULL) { if (my_perl != NULL) {
execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::reload_all", 0)), ""); execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::reload_all", 0)), "");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} else { } else {
perl_auto_load( NULL ); perl_auto_load( NULL );
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
static int static int
@ -1500,7 +1500,7 @@ perl_command_load (char *word[], char *word_eol[], void *userdata)
if (file != NULL ) if (file != NULL )
{ {
perl_load_file (file); perl_load_file (file);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_NONE; return HEXCHAT_EAT_NONE;
@ -1513,7 +1513,7 @@ perl_command_unload (char *word[], char *word_eol[], void *userdata)
if (my_perl != NULL && file != NULL) { if (my_perl != NULL && file != NULL) {
execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::unload", 0)), file); execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::unload", 0)), file);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_NONE; return HEXCHAT_EAT_NONE;
@ -1526,10 +1526,10 @@ perl_command_reload (char *word[], char *word_eol[], void *userdata)
if (my_perl != NULL && file != NULL) { if (my_perl != NULL && file != NULL) {
execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::reload", 0)), file); execute_perl (sv_2mortal (newSVpv ("Xchat::Embed::reload", 0)), file);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
void void

View File

@ -1171,7 +1171,7 @@ Plugin_New(char *filename, PyMethodDef *xchat_methods, PyObject *xcoobj)
} }
PyModule_AddIntConstant(m, "EAT_NONE", HEXCHAT_EAT_NONE); PyModule_AddIntConstant(m, "EAT_NONE", HEXCHAT_EAT_NONE);
PyModule_AddIntConstant(m, "EAT_XCHAT", HEXCHAT_EAT_XCHAT); PyModule_AddIntConstant(m, "EAT_XCHAT", HEXCHAT_EAT_HEXCHAT);
PyModule_AddIntConstant(m, "EAT_PLUGIN", HEXCHAT_EAT_PLUGIN); PyModule_AddIntConstant(m, "EAT_PLUGIN", HEXCHAT_EAT_PLUGIN);
PyModule_AddIntConstant(m, "EAT_ALL", HEXCHAT_EAT_ALL); PyModule_AddIntConstant(m, "EAT_ALL", HEXCHAT_EAT_ALL);
PyModule_AddIntConstant(m, "PRI_HIGHEST", HEXCHAT_PRI_HIGHEST); PyModule_AddIntConstant(m, "PRI_HIGHEST", HEXCHAT_PRI_HIGHEST);
@ -2192,7 +2192,7 @@ Command_Load(char *word[], char *word_eol[], void *userdata)
int len = strlen(word[2]); int len = strlen(word[2]);
if (len > 3 && strcasecmp(".py", word[2]+len-3) == 0) { if (len > 3 && strcasecmp(".py", word[2]+len-3) == 0) {
Command_PyLoad(word[2]); Command_PyLoad(word[2]);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_NONE; return HEXCHAT_EAT_NONE;
} }
@ -2203,7 +2203,7 @@ Command_Unload(char *word[], char *word_eol[], void *userdata)
int len = strlen(word[2]); int len = strlen(word[2]);
if (len > 3 && strcasecmp(".py", word[2]+len-3) == 0) { if (len > 3 && strcasecmp(".py", word[2]+len-3) == 0) {
Command_PyUnload(word[2]); Command_PyUnload(word[2]);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_NONE; return HEXCHAT_EAT_NONE;
} }

View File

@ -383,7 +383,7 @@ printInfo (char *word[], char *word_eol[], void *user_data)
hexchat_printf (ph, " * Uptime: %.2f Hours\n", (float) GetTickCount() / 1000 / 60 / 60); hexchat_printf (ph, " * Uptime: %.2f Hours\n", (float) GetTickCount() / 1000 / 60 / 60);
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
int int

View File

@ -988,7 +988,7 @@ static int tcl_complete(ClientData cd, Tcl_Interp * irp, int argc, const char *a
if (strcasecmp("EAT_NONE", argv[1]) == 0) if (strcasecmp("EAT_NONE", argv[1]) == 0)
complete[complete_level].result = HEXCHAT_EAT_NONE; complete[complete_level].result = HEXCHAT_EAT_NONE;
else if (strcasecmp("EAT_XCHAT", argv[1]) == 0) else if (strcasecmp("EAT_XCHAT", argv[1]) == 0)
complete[complete_level].result = HEXCHAT_EAT_XCHAT; complete[complete_level].result = HEXCHAT_EAT_HEXCHAT;
else if (strcasecmp("EAT_PLUGIN", argv[1]) == 0) else if (strcasecmp("EAT_PLUGIN", argv[1]) == 0)
complete[complete_level].result = HEXCHAT_EAT_PLUGIN; complete[complete_level].result = HEXCHAT_EAT_PLUGIN;
else if (strcasecmp("EAT_ALL", argv[1]) == 0) else if (strcasecmp("EAT_ALL", argv[1]) == 0)
@ -2054,7 +2054,7 @@ static int Command_Source(char *word[], char *word_eol[], void *userdata)
complete_level--; complete_level--;
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} else { } else {
complete_level--; complete_level--;

View File

@ -163,14 +163,14 @@ print_version (char *word[], char *word_eol[], void *userdata)
if (!g_ascii_strcasecmp ("HELP", word[2])) if (!g_ascii_strcasecmp ("HELP", word[2]))
{ {
hexchat_printf (ph, upd_help); hexchat_printf (ph, upd_help);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
else if (!g_ascii_strcasecmp ("SET", word[2])) else if (!g_ascii_strcasecmp ("SET", word[2]))
{ {
if (!g_ascii_strcasecmp ("", word_eol[4])) if (!g_ascii_strcasecmp ("", word_eol[4]))
{ {
hexchat_printf (ph, "%s\tEnter a value!\n", name); hexchat_printf (ph, "%s\tEnter a value!\n", name);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if (!g_ascii_strcasecmp ("delay", word[3])) if (!g_ascii_strcasecmp ("delay", word[3]))
{ {
@ -205,10 +205,10 @@ print_version (char *word[], char *word_eol[], void *userdata)
else else
{ {
hexchat_printf (ph, "%s\tInvalid variable name! Use 'delay' or 'freq'!\n", name); hexchat_printf (ph, "%s\tInvalid variable name! Use 'delay' or 'freq'!\n", name);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
else if (!g_ascii_strcasecmp ("", word[2])) else if (!g_ascii_strcasecmp ("", word[2]))
{ {
@ -230,12 +230,12 @@ print_version (char *word[], char *word_eol[], void *userdata)
hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\nhttps://github.com/downloads/hexchat/hexchat/HexChat%%20%s%%20x86.exe\n", name, version); hexchat_printf (ph, "%s\tA HexChat update is available! You can download it from here:\nhttps://github.com/downloads/hexchat/hexchat/HexChat%%20%s%%20x86.exe\n", name, version);
#endif #endif
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
else else
{ {
hexchat_printf (ph, upd_help); hexchat_printf (ph, upd_help);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
} }

View File

@ -21,9 +21,9 @@
#define HEXCHAT_FD_NOTSOCKET 8 #define HEXCHAT_FD_NOTSOCKET 8
#define HEXCHAT_EAT_NONE 0 /* pass it on through! */ #define HEXCHAT_EAT_NONE 0 /* pass it on through! */
#define HEXCHAT_EAT_XCHAT 1 /* don't let xchat see this event */ #define HEXCHAT_EAT_HEXCHAT 1 /* don't let xchat see this event */
#define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */ #define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
#define HEXCHAT_EAT_ALL (HEXCHAT_EAT_XCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */ #define HEXCHAT_EAT_ALL (HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -158,13 +158,13 @@ static int xdcc_command(char *word[], char *word_eol[], void *userdata)
else else
hexchat_printf(ph, "Cannot read %s\n", word[4]); hexchat_printf(ph, "Cannot read %s\n", word[4]);
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if(strcasecmp(word[2], "DEL") == 0) if(strcasecmp(word[2], "DEL") == 0)
{ {
xdcc_del(word[3]); xdcc_del(word[3]);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if(strcasecmp(word[2], "SLOTS") == 0) if(strcasecmp(word[2], "SLOTS") == 0)
@ -177,27 +177,27 @@ static int xdcc_command(char *word[], char *word_eol[], void *userdata)
{ {
hexchat_printf(ph, "XDCC slots: %d\n", xdcc_slots); hexchat_printf(ph, "XDCC slots: %d\n", xdcc_slots);
} }
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if(strcasecmp(word[2], "ON") == 0) if(strcasecmp(word[2], "ON") == 0)
{ {
xdcc_on = TRUE; xdcc_on = TRUE;
hexchat_print(ph, "XDCC now ON\n"); hexchat_print(ph, "XDCC now ON\n");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if(strcasecmp(word[2], "LIST") == 0) if(strcasecmp(word[2], "LIST") == 0)
{ {
xdcc_list("", "", "", "echo"); xdcc_list("", "", "", "echo");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if(strcasecmp(word[2], "OFF") == 0) if(strcasecmp(word[2], "OFF") == 0)
{ {
xdcc_on = FALSE; xdcc_on = FALSE;
hexchat_print(ph, "XDCC now OFF\n"); hexchat_print(ph, "XDCC now OFF\n");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
hexchat_print(ph, "Syntax: XDCC ADD <name> <fullpath> <description>\n" hexchat_print(ph, "Syntax: XDCC ADD <name> <fullpath> <description>\n"
@ -207,7 +207,7 @@ static int xdcc_command(char *word[], char *word_eol[], void *userdata)
" XDCC ON\n" " XDCC ON\n"
" XDCC OFF\n\n"); " XDCC OFF\n\n");
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
static void xdcc_remote(char *from, char *msg) static void xdcc_remote(char *from, char *msg)

View File

@ -16,9 +16,9 @@
#define HEXCHAT_FD_NOTSOCKET 8 #define HEXCHAT_FD_NOTSOCKET 8
#define HEXCHAT_EAT_NONE 0 /* pass it on through! */ #define HEXCHAT_EAT_NONE 0 /* pass it on through! */
#define HEXCHAT_EAT_XCHAT 1 /* don't let xchat see this event */ #define HEXCHAT_EAT_HEXCHAT 1 /* don't let xchat see this event */
#define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */ #define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
#define HEXCHAT_EAT_ALL (HEXCHAT_EAT_XCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */ #define HEXCHAT_EAT_ALL (HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -148,7 +148,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
if (!word[2][0]) if (!word[2][0])
{ {
timer_showlist (); timer_showlist ();
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if (g_ascii_strcasecmp (word[2], "-quiet") == 0) if (g_ascii_strcasecmp (word[2], "-quiet") == 0)
@ -160,7 +160,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
if (g_ascii_strcasecmp (word[2 + offset], "-delete") == 0) if (g_ascii_strcasecmp (word[2 + offset], "-delete") == 0)
{ {
timer_del_ref (atoi (word[3 + offset]), quiet); timer_del_ref (atoi (word[3 + offset]), quiet);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
if (g_ascii_strcasecmp (word[2 + offset], "-refnum") == 0) if (g_ascii_strcasecmp (word[2 + offset], "-refnum") == 0)
@ -183,7 +183,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
else else
timer_add (ref, timeout, repeat, command); timer_add (ref, timeout, repeat, command);
return HEXCHAT_EAT_XCHAT; return HEXCHAT_EAT_HEXCHAT;
} }
int int

View File

@ -562,14 +562,14 @@ plugin_hook_run (session *sess, char *name, char *word[], char *word_eol[], int
break; break;
} }
if ((ret & HEXCHAT_EAT_XCHAT) && (ret & HEXCHAT_EAT_PLUGIN)) if ((ret & HEXCHAT_EAT_HEXCHAT) && (ret & HEXCHAT_EAT_PLUGIN))
{ {
eat = 1; eat = 1;
goto xit; goto xit;
} }
if (ret & HEXCHAT_EAT_PLUGIN) if (ret & HEXCHAT_EAT_PLUGIN)
goto xit; /* stop running plugins */ goto xit; /* stop running plugins */
if (ret & HEXCHAT_EAT_XCHAT) if (ret & HEXCHAT_EAT_HEXCHAT)
eat = 1; /* eventually we'll return 1, but continue running plugins */ eat = 1; /* eventually we'll return 1, but continue running plugins */
list = next; list = next;