mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 21:00:40 +02:00
.. lots of changes ..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@197 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
bacfcb060c
commit
d3dc9a1307
106 changed files with 4864 additions and 1597 deletions
|
|
@ -36,7 +36,6 @@ static char *levels[] =
|
|||
"KICKS",
|
||||
"MODES",
|
||||
"TOPICS",
|
||||
"WALLS",
|
||||
"WALLOPS",
|
||||
"INVITES",
|
||||
"NICKS",
|
||||
|
|
|
|||
|
|
@ -20,17 +20,16 @@
|
|||
#define MSGLEVEL_KICKS 0x0000400
|
||||
#define MSGLEVEL_MODES 0x0000800
|
||||
#define MSGLEVEL_TOPICS 0x0001000
|
||||
#define MSGLEVEL_WALLS 0x0002000
|
||||
#define MSGLEVEL_WALLOPS 0x0004000
|
||||
#define MSGLEVEL_INVITES 0x0008000
|
||||
#define MSGLEVEL_NICKS 0x0010000
|
||||
#define MSGLEVEL_DCC 0x0020000
|
||||
#define MSGLEVEL_CLIENTNOTICE 0x0040000
|
||||
#define MSGLEVEL_CLIENTCRAP 0x0080000
|
||||
#define MSGLEVEL_CLIENTERROR 0x0100000
|
||||
#define MSGLEVEL_HILIGHT 0x0200000
|
||||
#define MSGLEVEL_WALLOPS 0x0002000
|
||||
#define MSGLEVEL_INVITES 0x0004000
|
||||
#define MSGLEVEL_NICKS 0x0008000
|
||||
#define MSGLEVEL_DCC 0x0010000
|
||||
#define MSGLEVEL_CLIENTNOTICE 0x0020000
|
||||
#define MSGLEVEL_CLIENTCRAP 0x0040000
|
||||
#define MSGLEVEL_CLIENTERROR 0x0080000
|
||||
#define MSGLEVEL_HILIGHT 0x0100000
|
||||
|
||||
#define MSGLEVEL_ALL 0x03fffff
|
||||
#define MSGLEVEL_ALL 0x01fffff
|
||||
|
||||
#define MSGLEVEL_NOHILIGHT 0x1000000 /* Don't try to hilight words in this message */
|
||||
#define MSGLEVEL_NO_ACT 0x2000000 /* Don't trigger channel activity */
|
||||
|
|
|
|||
|
|
@ -60,7 +60,9 @@ static char *server_create_address_tag(const char *address)
|
|||
const char *start, *end;
|
||||
|
||||
/* try to generate a reasonable server tag */
|
||||
if (g_strncasecmp(address, "irc", 3) == 0 ||
|
||||
if (strchr(address, '.') == NULL) {
|
||||
start = end = NULL;
|
||||
} else if (g_strncasecmp(address, "irc", 3) == 0 ||
|
||||
g_strncasecmp(address, "chat", 4) == 0) {
|
||||
/* irc-2.cs.hut.fi -> hut, chat.bt.net -> bt */
|
||||
end = strrchr(address, '.');
|
||||
|
|
@ -224,14 +226,14 @@ SERVER_REC *server_find_tag(const char *tag)
|
|||
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
||||
SERVER_REC *server = tmp->data;
|
||||
|
||||
if (strcmp(server->tag, tag) == 0)
|
||||
if (g_strcasecmp(server->tag, tag) == 0)
|
||||
return server;
|
||||
}
|
||||
|
||||
for (tmp = lookup_servers; tmp != NULL; tmp = tmp->next) {
|
||||
SERVER_REC *server = tmp->data;
|
||||
|
||||
if (strcmp(server->tag, tag) == 0)
|
||||
if (g_strcasecmp(server->tag, tag) == 0)
|
||||
return server;
|
||||
}
|
||||
|
||||
|
|
@ -249,7 +251,7 @@ SERVER_REC *server_find_ircnet(const char *ircnet)
|
|||
SERVER_REC *server = tmp->data;
|
||||
|
||||
if (server->connrec->ircnet != NULL &&
|
||||
strcmp(server->connrec->ircnet, ircnet) == 0) return server;
|
||||
g_strcasecmp(server->connrec->ircnet, ircnet) == 0) return server;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -258,7 +258,11 @@ static void init_configfile(void)
|
|||
if (stat(str, &statbuf) != 0) {
|
||||
/* ~/.irssi not found, create it. */
|
||||
if (mkdir(str, 0700) != 0)
|
||||
g_error("Couldn't create %s/.irssi directory", g_get_home_dir());
|
||||
g_error(_("Couldn't create %s/.irssi directory"), g_get_home_dir());
|
||||
} else {
|
||||
if (!S_ISDIR(statbuf.st_mode)) {
|
||||
g_error(_("%s/.irssi is not a directory.\nYou should remove it with command: rm ~/.irssi"), g_get_home_dir());
|
||||
}
|
||||
}
|
||||
g_free(str);
|
||||
|
||||
|
|
@ -266,7 +270,7 @@ static void init_configfile(void)
|
|||
|
||||
/* any errors? */
|
||||
if (config_last_error(mainconfig) != NULL) {
|
||||
last_error_msg = g_strdup_printf("Ignored errors in configuration file:\n%s",
|
||||
last_error_msg = g_strdup_printf(_("Ignored errors in configuration file:\n%s"),
|
||||
config_last_error(mainconfig));
|
||||
signal_add("irssi init finished", (SIGNAL_FUNC) sig_print_config_error);
|
||||
}
|
||||
|
|
@ -291,7 +295,7 @@ static void cmd_rehash(const char *data)
|
|||
|
||||
if (config_last_error(tempconfig) != NULL) {
|
||||
/* error */
|
||||
str = g_strdup_printf("Errors in configuration file:\n%s",
|
||||
str = g_strdup_printf(_("Errors in configuration file:\n%s"),
|
||||
config_last_error(tempconfig));
|
||||
signal_emit("gui dialog", 2, "error", str);
|
||||
g_free(str);
|
||||
|
|
@ -308,7 +312,16 @@ static void cmd_rehash(const char *data)
|
|||
|
||||
static void cmd_save(const char *data)
|
||||
{
|
||||
config_write(mainconfig, *data == '\0' ? NULL : data, 0660);
|
||||
char *str;
|
||||
|
||||
if (config_write(mainconfig, *data == '\0' ? NULL : data, 0660) == 0)
|
||||
return;
|
||||
|
||||
/* error */
|
||||
str = g_strdup_printf(_("Couldn't save configuration file: %s"),
|
||||
config_last_error(mainconfig));
|
||||
signal_emit("gui dialog", 2, "error", str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
void settings_init(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue