mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp.
This commit is contained in:
parent
5ca9287182
commit
0d4f13d20f
@ -102,7 +102,7 @@ CHANNEL_SETUP_REC *channel_setup_find(const char *channel,
|
|||||||
for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) {
|
||||||
CHANNEL_SETUP_REC *rec = tmp->data;
|
CHANNEL_SETUP_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, channel) == 0 &&
|
if (g_ascii_strcasecmp(rec->name, channel) == 0 &&
|
||||||
channel_chatnet_match(rec->chatnet, chatnet))
|
channel_chatnet_match(rec->chatnet, chatnet))
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,6 @@ CHANNEL_SETUP_REC *channel_setup_find(const char *channel,
|
|||||||
|
|
||||||
#define channel_chatnet_match(rec, chatnet) \
|
#define channel_chatnet_match(rec, chatnet) \
|
||||||
((rec) == NULL || (rec)[0] == '\0' || \
|
((rec) == NULL || (rec)[0] == '\0' || \
|
||||||
((chatnet) != NULL && g_strcasecmp(rec, chatnet) == 0))
|
((chatnet) != NULL && g_ascii_strcasecmp(rec, chatnet) == 0))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -110,7 +110,7 @@ static CHANNEL_REC *channel_find_server(SERVER_REC *server,
|
|||||||
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
|
||||||
CHANNEL_REC *rec = tmp->data;
|
CHANNEL_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(name, rec->name) == 0)
|
if (g_ascii_strcasecmp(name, rec->name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ static RECONNECT_REC *find_reconnect_server(int chat_type,
|
|||||||
|
|
||||||
if (rec->conn->chat_type == chat_type) {
|
if (rec->conn->chat_type == chat_type) {
|
||||||
count++; last_proto_match = rec;
|
count++; last_proto_match = rec;
|
||||||
if (g_strcasecmp(rec->conn->address, addr) == 0) {
|
if (g_ascii_strcasecmp(rec->conn->address, addr) == 0) {
|
||||||
if (rec->conn->port == port)
|
if (rec->conn->port == port)
|
||||||
return rec;
|
return rec;
|
||||||
match = rec;
|
match = rec;
|
||||||
|
@ -59,7 +59,7 @@ CHAT_PROTOCOL_REC *chat_protocol_find(const char *name)
|
|||||||
for (tmp = chat_protocols; tmp != NULL; tmp = tmp->next) {
|
for (tmp = chat_protocols; tmp != NULL; tmp = tmp->next) {
|
||||||
CHAT_PROTOCOL_REC *rec = tmp->data;
|
CHAT_PROTOCOL_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, name) == 0)
|
if (g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ CHATNET_REC *chatnet_find(const char *name)
|
|||||||
for (tmp = chatnets; tmp != NULL; tmp = tmp->next) {
|
for (tmp = chatnets; tmp != NULL; tmp = tmp->next) {
|
||||||
CHATNET_REC *rec = tmp->data;
|
CHATNET_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, name) == 0)
|
if (g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ COMMAND_REC *command_find(const char *cmd)
|
|||||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||||
COMMAND_REC *rec = tmp->data;
|
COMMAND_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->cmd, cmd) == 0)
|
if (g_ascii_strcasecmp(rec->cmd, cmd) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ static COMMAND_MODULE_REC *command_module_find(COMMAND_REC *rec,
|
|||||||
for (tmp = rec->modules; tmp != NULL; tmp = tmp->next) {
|
for (tmp = rec->modules; tmp != NULL; tmp = tmp->next) {
|
||||||
COMMAND_MODULE_REC *rec = tmp->data;
|
COMMAND_MODULE_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, module) == 0)
|
if (g_ascii_strcasecmp(rec->name, module) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ int command_have_sub(const char *command)
|
|||||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||||
COMMAND_REC *rec = tmp->data;
|
COMMAND_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->cmd, command, len) == 0 &&
|
if (g_ascii_strncasecmp(rec->cmd, command, len) == 0 &&
|
||||||
rec->cmd[len] == ' ')
|
rec->cmd[len] == ' ')
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ static const char *command_expand(char *cmd)
|
|||||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||||
COMMAND_REC *rec = tmp->data;
|
COMMAND_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->cmd, cmd, len) == 0 &&
|
if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0 &&
|
||||||
strchr(rec->cmd+len, ' ') == NULL) {
|
strchr(rec->cmd+len, ' ') == NULL) {
|
||||||
if (rec->cmd[len] == '\0') {
|
if (rec->cmd[len] == '\0') {
|
||||||
/* full match */
|
/* full match */
|
||||||
@ -345,7 +345,7 @@ static GSList *optlist_find(GSList *optlist, const char *option)
|
|||||||
char *name = optlist->data;
|
char *name = optlist->data;
|
||||||
if (iscmdtype(*name)) name++;
|
if (iscmdtype(*name)) name++;
|
||||||
|
|
||||||
if (g_strcasecmp(name, option) == 0)
|
if (g_ascii_strcasecmp(name, option) == 0)
|
||||||
return optlist;
|
return optlist;
|
||||||
|
|
||||||
optlist = optlist->next;
|
optlist = optlist->next;
|
||||||
@ -371,7 +371,7 @@ int command_have_option(const char *cmd, const char *option)
|
|||||||
for (tmp = rec->options; *tmp != NULL; tmp++) {
|
for (tmp = rec->options; *tmp != NULL; tmp++) {
|
||||||
char *name = iscmdtype(**tmp) ? (*tmp)+1 : *tmp;
|
char *name = iscmdtype(**tmp) ? (*tmp)+1 : *tmp;
|
||||||
|
|
||||||
if (g_strcasecmp(name, option) == 0)
|
if (g_ascii_strcasecmp(name, option) == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ static int option_find(char **array, const char *option)
|
|||||||
for (tmp = array; *tmp != NULL; tmp++, index++) {
|
for (tmp = array; *tmp != NULL; tmp++, index++) {
|
||||||
const char *text = *tmp + iscmdtype(**tmp);
|
const char *text = *tmp + iscmdtype(**tmp);
|
||||||
|
|
||||||
if (g_strncasecmp(text, option, len) == 0) {
|
if (g_ascii_strncasecmp(text, option, len) == 0) {
|
||||||
if (text[len] == '\0') {
|
if (text[len] == '\0') {
|
||||||
/* full match */
|
/* full match */
|
||||||
return index;
|
return index;
|
||||||
|
@ -115,7 +115,7 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text)
|
|||||||
|
|
||||||
#define ignore_match_server(rec, server) \
|
#define ignore_match_server(rec, server) \
|
||||||
((rec)->servertag == NULL || \
|
((rec)->servertag == NULL || \
|
||||||
g_strcasecmp((server)->tag, (rec)->servertag) == 0)
|
g_ascii_strcasecmp((server)->tag, (rec)->servertag) == 0)
|
||||||
|
|
||||||
int ignore_check(SERVER_REC *server, const char *nick, const char *host,
|
int ignore_check(SERVER_REC *server, const char *nick, const char *host,
|
||||||
const char *channel, const char *text, int level)
|
const char *channel, const char *text, int level)
|
||||||
@ -198,14 +198,14 @@ IGNORE_REC *ignore_find(const char *servertag, const char *mask,
|
|||||||
(servertag != NULL && rec->servertag == NULL))
|
(servertag != NULL && rec->servertag == NULL))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (servertag != NULL && g_strcasecmp(servertag, rec->servertag) != 0)
|
if (servertag != NULL && g_ascii_strcasecmp(servertag, rec->servertag) != 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((rec->mask == NULL && mask != NULL) ||
|
if ((rec->mask == NULL && mask != NULL) ||
|
||||||
(rec->mask != NULL && mask == NULL)) continue;
|
(rec->mask != NULL && mask == NULL)) continue;
|
||||||
|
|
||||||
if (rec->mask != NULL && g_strcasecmp(rec->mask, mask) != 0)
|
if (rec->mask != NULL && g_ascii_strcasecmp(rec->mask, mask) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((channels == NULL && rec->channels == NULL))
|
if ((channels == NULL && rec->channels == NULL))
|
||||||
|
@ -247,7 +247,7 @@ static int itemcmp(const char *patt, const char *item)
|
|||||||
|
|
||||||
if (!strcmp(patt, "*"))
|
if (!strcmp(patt, "*"))
|
||||||
return 0;
|
return 0;
|
||||||
return item ? g_strcasecmp(patt, item) : 1;
|
return item ? g_ascii_strcasecmp(patt, item) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
|
LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
|
||||||
@ -262,7 +262,7 @@ LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
|
|||||||
|
|
||||||
if (rec->type == type && itemcmp(rec->name, item) == 0 &&
|
if (rec->type == type && itemcmp(rec->name, item) == 0 &&
|
||||||
(rec->servertag == NULL || (servertag != NULL &&
|
(rec->servertag == NULL || (servertag != NULL &&
|
||||||
g_strcasecmp(rec->servertag, servertag) == 0)))
|
g_ascii_strcasecmp(rec->servertag, servertag) == 0)))
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ static int check_mask(SERVER_REC *server, const char *mask,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return wildcards ? match_wildcards(mask, str) :
|
return wildcards ? match_wildcards(mask, str) :
|
||||||
g_strcasecmp(mask, str) == 0;
|
g_ascii_strcasecmp(mask, str) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mask_match(SERVER_REC *server, const char *mask,
|
int mask_match(SERVER_REC *server, const char *mask,
|
||||||
@ -117,7 +117,7 @@ int masks_match(SERVER_REC *server, const char *masks,
|
|||||||
mask = g_strdup_printf("%s!%s", nick, address);
|
mask = g_strdup_printf("%s!%s", nick, address);
|
||||||
list = g_strsplit(masks, " ", -1);
|
list = g_strsplit(masks, " ", -1);
|
||||||
for (tmp = list; *tmp != NULL; tmp++) {
|
for (tmp = list; *tmp != NULL; tmp++) {
|
||||||
if (g_strcasecmp(*tmp, nick) == 0) {
|
if (g_ascii_strcasecmp(*tmp, nick) == 0) {
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ int find_substr(const char *list, const char *item)
|
|||||||
ptr = strchr(list, ' ');
|
ptr = strchr(list, ' ');
|
||||||
if (ptr == NULL) ptr = list+strlen(list);
|
if (ptr == NULL) ptr = list+strlen(list);
|
||||||
|
|
||||||
if (g_strncasecmp(list, item, ptr-list) == 0 &&
|
if (g_ascii_strncasecmp(list, item, ptr-list) == 0 &&
|
||||||
item[ptr-list] == '\0')
|
item[ptr-list] == '\0')
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ int strarray_find(char **array, const char *item)
|
|||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
for (tmp = array; *tmp != NULL; tmp++, index++) {
|
for (tmp = array; *tmp != NULL; tmp++, index++) {
|
||||||
if (g_strcasecmp(*tmp, item) == 0)
|
if (g_ascii_strcasecmp(*tmp, item) == 0)
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ GSList *gslist_find_string(GSList *list, const char *key)
|
|||||||
GSList *gslist_find_icase_string(GSList *list, const char *key)
|
GSList *gslist_find_icase_string(GSList *list, const char *key)
|
||||||
{
|
{
|
||||||
for (list = list; list != NULL; list = list->next)
|
for (list = list; list != NULL; list = list->next)
|
||||||
if (g_strcasecmp(list->data, key) == 0) return list;
|
if (g_ascii_strcasecmp(list->data, key) == 0) return list;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ GList *glist_find_string(GList *list, const char *key)
|
|||||||
GList *glist_find_icase_string(GList *list, const char *key)
|
GList *glist_find_icase_string(GList *list, const char *key)
|
||||||
{
|
{
|
||||||
for (list = list; list != NULL; list = list->next)
|
for (list = list; list != NULL; list = list->next)
|
||||||
if (g_strcasecmp(list->data, key) == 0) return list;
|
if (g_ascii_strcasecmp(list->data, key) == 0) return list;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -443,12 +443,12 @@ char *convert_home(const char *path)
|
|||||||
|
|
||||||
int g_istr_equal(gconstpointer v, gconstpointer v2)
|
int g_istr_equal(gconstpointer v, gconstpointer v2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp((const char *) v, (const char *) v2) == 0;
|
return g_ascii_strcasecmp((const char *) v, (const char *) v2) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int g_istr_cmp(gconstpointer v, gconstpointer v2)
|
int g_istr_cmp(gconstpointer v, gconstpointer v2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp((const char *) v, (const char *) v2);
|
return g_ascii_strcasecmp((const char *) v, (const char *) v2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a char* hash function from ASU */
|
/* a char* hash function from ASU */
|
||||||
|
@ -237,7 +237,7 @@ MODULE_REC *module_find(const char *name)
|
|||||||
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
||||||
MODULE_REC *rec = tmp->data;
|
MODULE_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, name) == 0)
|
if (g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ static void get_nicks_same_hash(gpointer key, NICK_REC *nick,
|
|||||||
NICKLIST_GET_SAME_REC *rec)
|
NICKLIST_GET_SAME_REC *rec)
|
||||||
{
|
{
|
||||||
while (nick != NULL) {
|
while (nick != NULL) {
|
||||||
if (g_strcasecmp(nick->nick, rec->nick) == 0) {
|
if (g_ascii_strcasecmp(nick->nick, rec->nick) == 0) {
|
||||||
rec->list = g_slist_append(rec->list, rec->channel);
|
rec->list = g_slist_append(rec->list, rec->channel);
|
||||||
rec->list = g_slist_append(rec->list, nick);
|
rec->list = g_slist_append(rec->list, nick);
|
||||||
}
|
}
|
||||||
@ -365,7 +365,7 @@ int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix)
|
|||||||
if (p2 == NULL) return 1;
|
if (p2 == NULL) return 1;
|
||||||
|
|
||||||
if (p1->prefixes[0] == p2->prefixes[0])
|
if (p1->prefixes[0] == p2->prefixes[0])
|
||||||
return g_strcasecmp(p1->nick, p2->nick);
|
return g_ascii_strcasecmp(p1->nick, p2->nick);
|
||||||
|
|
||||||
if (!p1->prefixes[0])
|
if (!p1->prefixes[0])
|
||||||
return 1;
|
return 1;
|
||||||
@ -384,7 +384,7 @@ int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* we should never have gotten here... */
|
/* we should never have gotten here... */
|
||||||
return g_strcasecmp(p1->nick, p2->nick);
|
return g_ascii_strcasecmp(p1->nick, p2->nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nicklist_update_flags_list(SERVER_REC *server, int gone,
|
static void nicklist_update_flags_list(SERVER_REC *server, int gone,
|
||||||
@ -516,7 +516,8 @@ int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick)
|
|||||||
|
|
||||||
/* first check for identical match */
|
/* first check for identical match */
|
||||||
len = strlen(nick);
|
len = strlen(nick);
|
||||||
if (g_strncasecmp(msg, nick, len) == 0 && !isalnumhigh((int) msg[len]))
|
if (g_ascii_strncasecmp(msg, nick, len) == 0 &&
|
||||||
|
!isalnumhigh((int) msg[len]))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
orignick = nick;
|
orignick = nick;
|
||||||
|
@ -97,7 +97,7 @@ static QUERY_REC *query_find_server(SERVER_REC *server, const char *nick)
|
|||||||
for (tmp = server->queries; tmp != NULL; tmp = tmp->next) {
|
for (tmp = server->queries; tmp != NULL; tmp = tmp->next) {
|
||||||
QUERY_REC *rec = tmp->data;
|
QUERY_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, nick) == 0)
|
if (g_ascii_strcasecmp(rec->name, nick) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ QUERY_REC *query_find(SERVER_REC *server, const char *nick)
|
|||||||
for (tmp = queries; tmp != NULL; tmp = tmp->next) {
|
for (tmp = queries; tmp != NULL; tmp = tmp->next) {
|
||||||
QUERY_REC *rec = tmp->data;
|
QUERY_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, nick) == 0)
|
if (g_ascii_strcasecmp(rec->name, nick) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
|
|||||||
|
|
||||||
#define sserver_connect_ok(rec, net) \
|
#define sserver_connect_ok(rec, net) \
|
||||||
(!(rec)->banned && (rec)->chatnet != NULL && \
|
(!(rec)->banned && (rec)->chatnet != NULL && \
|
||||||
g_strcasecmp((rec)->chatnet, (net)) == 0)
|
g_ascii_strcasecmp((rec)->chatnet, (net)) == 0)
|
||||||
|
|
||||||
static void sig_reconnect(SERVER_REC *server)
|
static void sig_reconnect(SERVER_REC *server)
|
||||||
{
|
{
|
||||||
@ -283,7 +283,7 @@ static void sig_reconnect(SERVER_REC *server)
|
|||||||
SERVER_SETUP_REC *rec = tmp->data;
|
SERVER_SETUP_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (!use_next && server->connrec->port == rec->port &&
|
if (!use_next && server->connrec->port == rec->port &&
|
||||||
g_strcasecmp(rec->address, server->connrec->address) == 0)
|
g_ascii_strcasecmp(rec->address, server->connrec->address) == 0)
|
||||||
use_next = TRUE;
|
use_next = TRUE;
|
||||||
else if (use_next && sserver_connect_ok(rec, conn->chatnet)) {
|
else if (use_next && sserver_connect_ok(rec, conn->chatnet)) {
|
||||||
if (rec == sserver)
|
if (rec == sserver)
|
||||||
|
@ -282,7 +282,7 @@ create_chatnet_conn(const char *dest, int port,
|
|||||||
SERVER_SETUP_REC *rec = tmp->data;
|
SERVER_SETUP_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->chatnet == NULL ||
|
if (rec->chatnet == NULL ||
|
||||||
g_strcasecmp(rec->chatnet, dest) != 0)
|
g_ascii_strcasecmp(rec->chatnet, dest) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!rec->last_failed) {
|
if (!rec->last_failed) {
|
||||||
@ -342,9 +342,9 @@ SERVER_SETUP_REC *server_setup_find(const char *address, int port,
|
|||||||
for (tmp = setupservers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = setupservers; tmp != NULL; tmp = tmp->next) {
|
||||||
SERVER_SETUP_REC *rec = tmp->data;
|
SERVER_SETUP_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->address, address) == 0 &&
|
if (g_ascii_strcasecmp(rec->address, address) == 0 &&
|
||||||
(chatnet == NULL || rec->chatnet == NULL ||
|
(chatnet == NULL || rec->chatnet == NULL ||
|
||||||
g_strcasecmp(rec->chatnet, chatnet) == 0)) {
|
g_ascii_strcasecmp(rec->chatnet, chatnet) == 0)) {
|
||||||
server = rec;
|
server = rec;
|
||||||
if (rec->port == port)
|
if (rec->port == port)
|
||||||
break;
|
break;
|
||||||
|
@ -553,7 +553,7 @@ SERVER_REC *server_find_tag(const char *tag)
|
|||||||
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
||||||
SERVER_REC *server = tmp->data;
|
SERVER_REC *server = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(server->tag, tag) == 0)
|
if (g_ascii_strcasecmp(server->tag, tag) == 0)
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,7 +570,7 @@ SERVER_REC *server_find_lookup_tag(const char *tag)
|
|||||||
for (tmp = lookup_servers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = lookup_servers; tmp != NULL; tmp = tmp->next) {
|
||||||
SERVER_REC *server = tmp->data;
|
SERVER_REC *server = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(server->tag, tag) == 0)
|
if (g_ascii_strcasecmp(server->tag, tag) == 0)
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,7 +588,7 @@ SERVER_REC *server_find_chatnet(const char *chatnet)
|
|||||||
SERVER_REC *server = tmp->data;
|
SERVER_REC *server = tmp->data;
|
||||||
|
|
||||||
if (server->connrec->chatnet != NULL &&
|
if (server->connrec->chatnet != NULL &&
|
||||||
g_strcasecmp(server->connrec->chatnet, chatnet) == 0)
|
g_ascii_strcasecmp(server->connrec->chatnet, chatnet) == 0)
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ static LAST_MSG_REC *last_msg_find(GSList *list, const char *nick)
|
|||||||
while (list != NULL) {
|
while (list != NULL) {
|
||||||
LAST_MSG_REC *rec = list->data;
|
LAST_MSG_REC *rec = list->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->nick, nick) == 0)
|
if (g_ascii_strcasecmp(rec->nick, nick) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
list = list->next;
|
list = list->next;
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ static void completion_msg_server(GSList **list, SERVER_REC *server,
|
|||||||
for (; tmp != NULL; tmp = tmp->next) {
|
for (; tmp != NULL; tmp = tmp->next) {
|
||||||
LAST_MSG_REC *rec = tmp->data;
|
LAST_MSG_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (len != 0 && g_strncasecmp(rec->nick, nick, len) != 0)
|
if (len != 0 && g_ascii_strncasecmp(rec->nick, nick, len) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
msg = g_new(LAST_MSG_REC, 1);
|
msg = g_new(LAST_MSG_REC, 1);
|
||||||
@ -352,7 +352,7 @@ static void complete_from_nicklist(GList **outlist, CHANNEL_REC *channel,
|
|||||||
for (tmp = mchannel->lastmsgs; tmp != NULL; tmp = tmp->next) {
|
for (tmp = mchannel->lastmsgs; tmp != NULL; tmp = tmp->next) {
|
||||||
LAST_MSG_REC *rec = tmp->data;
|
LAST_MSG_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->nick, nick, len) == 0 &&
|
if (g_ascii_strncasecmp(rec->nick, nick, len) == 0 &&
|
||||||
glist_find_icase_string(*outlist, rec->nick) == NULL) {
|
glist_find_icase_string(*outlist, rec->nick) == NULL) {
|
||||||
str = g_strconcat(rec->nick, suffix, NULL);
|
str = g_strconcat(rec->nick, suffix, NULL);
|
||||||
if (completion_lowercase) ascii_strdown(str);
|
if (completion_lowercase) ascii_strdown(str);
|
||||||
@ -404,7 +404,7 @@ static GList *completion_nicks_nonstrict(CHANNEL_REC *channel,
|
|||||||
*out = '\0';
|
*out = '\0';
|
||||||
|
|
||||||
/* add to list if 'cleaned' nick matches */
|
/* add to list if 'cleaned' nick matches */
|
||||||
if (g_strncasecmp(str, nick, len) == 0) {
|
if (g_ascii_strncasecmp(str, nick, len) == 0) {
|
||||||
tnick = g_strconcat(rec->nick, suffix, NULL);
|
tnick = g_strconcat(rec->nick, suffix, NULL);
|
||||||
if (completion_lowercase)
|
if (completion_lowercase)
|
||||||
ascii_strdown(tnick);
|
ascii_strdown(tnick);
|
||||||
@ -447,7 +447,7 @@ static GList *completion_channel_nicks(CHANNEL_REC *channel, const char *nick,
|
|||||||
for (tmp = nicks; tmp != NULL; tmp = tmp->next) {
|
for (tmp = nicks; tmp != NULL; tmp = tmp->next) {
|
||||||
NICK_REC *rec = tmp->data;
|
NICK_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->nick, nick, len) == 0 &&
|
if (g_ascii_strncasecmp(rec->nick, nick, len) == 0 &&
|
||||||
rec != channel->ownnick) {
|
rec != channel->ownnick) {
|
||||||
str = g_strconcat(rec->nick, suffix, NULL);
|
str = g_strconcat(rec->nick, suffix, NULL);
|
||||||
if (completion_lowercase)
|
if (completion_lowercase)
|
||||||
@ -501,7 +501,7 @@ GList *completion_get_servertags(const char *word)
|
|||||||
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
||||||
SERVER_REC *rec = tmp->data;
|
SERVER_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->tag, word, len) == 0) {
|
if (g_ascii_strncasecmp(rec->tag, word, len) == 0) {
|
||||||
if (rec == active_win->active_server)
|
if (rec == active_win->active_server)
|
||||||
list = g_list_prepend(list, g_strdup(rec->tag));
|
list = g_list_prepend(list, g_strdup(rec->tag));
|
||||||
else
|
else
|
||||||
@ -529,9 +529,9 @@ GList *completion_get_channels(SERVER_REC *server, const char *word)
|
|||||||
for (; tmp != NULL; tmp = tmp->next) {
|
for (; tmp != NULL; tmp = tmp->next) {
|
||||||
CHANNEL_REC *rec = tmp->data;
|
CHANNEL_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->visible_name, word, len) == 0)
|
if (g_ascii_strncasecmp(rec->visible_name, word, len) == 0)
|
||||||
list = g_list_append(list, g_strdup(rec->visible_name));
|
list = g_list_append(list, g_strdup(rec->visible_name));
|
||||||
else if (g_strncasecmp(rec->name, word, len) == 0)
|
else if (g_ascii_strncasecmp(rec->name, word, len) == 0)
|
||||||
list = g_list_append(list, g_strdup(rec->name));
|
list = g_list_append(list, g_strdup(rec->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ GList *completion_get_channels(SERVER_REC *server, const char *word)
|
|||||||
for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) {
|
||||||
CHANNEL_SETUP_REC *rec = tmp->data;
|
CHANNEL_SETUP_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->name, word, len) == 0 &&
|
if (g_ascii_strncasecmp(rec->name, word, len) == 0 &&
|
||||||
glist_find_icase_string(list, rec->name) == NULL)
|
glist_find_icase_string(list, rec->name) == NULL)
|
||||||
list = g_list_append(list, g_strdup(rec->name));
|
list = g_list_append(list, g_strdup(rec->name));
|
||||||
|
|
||||||
@ -569,7 +569,7 @@ GList *completion_get_aliases(const char *word)
|
|||||||
if (node->type != NODE_TYPE_KEY)
|
if (node->type != NODE_TYPE_KEY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (len != 0 && g_strncasecmp(node->key, word, len) != 0)
|
if (len != 0 && g_ascii_strncasecmp(node->key, word, len) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
list = g_list_append(list, g_strdup(node->key));
|
list = g_list_append(list, g_strdup(node->key));
|
||||||
@ -655,7 +655,7 @@ static void sig_complete_word(GList **list, WINDOW_REC *window,
|
|||||||
channel = CHANNEL(window->active);
|
channel = CHANNEL(window->active);
|
||||||
query = QUERY(window->active);
|
query = QUERY(window->active);
|
||||||
if (channel == NULL && query != NULL &&
|
if (channel == NULL && query != NULL &&
|
||||||
g_strncasecmp(word, query->name, strlen(word)) == 0) {
|
g_ascii_strncasecmp(word, query->name, strlen(word)) == 0) {
|
||||||
/* completion in query */
|
/* completion in query */
|
||||||
*list = g_list_append(*list, g_strdup(query->name));
|
*list = g_list_append(*list, g_strdup(query->name));
|
||||||
} else if (channel != NULL) {
|
} else if (channel != NULL) {
|
||||||
@ -737,7 +737,7 @@ static void sig_erase_complete_msg(WINDOW_REC *window, const char *word,
|
|||||||
for (tmp = mserver->lastmsgs; tmp != NULL; tmp = tmp->next) {
|
for (tmp = mserver->lastmsgs; tmp != NULL; tmp = tmp->next) {
|
||||||
LAST_MSG_REC *rec = tmp->data;
|
LAST_MSG_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->nick, word) == 0) {
|
if (g_ascii_strcasecmp(rec->nick, word) == 0) {
|
||||||
last_msg_destroy(&mserver->lastmsgs, rec);
|
last_msg_destroy(&mserver->lastmsgs, rec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -760,7 +760,7 @@ GList *completion_get_chatnets(const char *word)
|
|||||||
for (tmp = chatnets; tmp != NULL; tmp = tmp->next) {
|
for (tmp = chatnets; tmp != NULL; tmp = tmp->next) {
|
||||||
CHATNET_REC *rec = tmp->data;
|
CHATNET_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->name, word, len) == 0)
|
if (g_ascii_strncasecmp(rec->name, word, len) == 0)
|
||||||
list = g_list_append(list, g_strdup(rec->name));
|
list = g_list_append(list, g_strdup(rec->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -781,7 +781,7 @@ GList *completion_get_servers(const char *word)
|
|||||||
for (tmp = setupservers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = setupservers; tmp != NULL; tmp = tmp->next) {
|
||||||
SERVER_SETUP_REC *rec = tmp->data;
|
SERVER_SETUP_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->address, word, len) == 0)
|
if (g_ascii_strncasecmp(rec->address, word, len) == 0)
|
||||||
list = g_list_append(list, g_strdup(rec->address));
|
list = g_list_append(list, g_strdup(rec->address));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -809,7 +809,7 @@ GList *completion_get_targets(const char *word)
|
|||||||
if (node->type != NODE_TYPE_KEY)
|
if (node->type != NODE_TYPE_KEY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (len != 0 && g_strncasecmp(node->key, word, len) != 0)
|
if (len != 0 && g_ascii_strncasecmp(node->key, word, len) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
list = g_list_append(list, g_strdup(node->key));
|
list = g_list_append(list, g_strdup(node->key));
|
||||||
@ -929,9 +929,9 @@ static void sig_complete_window(GList **list, WINDOW_REC *window,
|
|||||||
win = tmp->data;
|
win = tmp->data;
|
||||||
item = win->active;
|
item = win->active;
|
||||||
|
|
||||||
if (win->name != NULL && g_strncasecmp(win->name, word, len) == 0)
|
if (win->name != NULL && g_ascii_strncasecmp(win->name, word, len) == 0)
|
||||||
*list = g_list_append(*list, g_strdup(win->name));
|
*list = g_list_append(*list, g_strdup(win->name));
|
||||||
if (item != NULL && g_strncasecmp(item->visible_name, word, len) == 0)
|
if (item != NULL && g_ascii_strncasecmp(item->visible_name, word, len) == 0)
|
||||||
*list = g_list_append(*list, g_strdup(item->visible_name));
|
*list = g_list_append(*list, g_strdup(item->visible_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ HISTORY_REC *command_history_find_name(const char *name)
|
|||||||
for (tmp = histories; tmp != NULL; tmp = tmp->next) {
|
for (tmp = histories; tmp != NULL; tmp = tmp->next) {
|
||||||
HISTORY_REC *rec = tmp->data;
|
HISTORY_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->name != NULL && g_strcasecmp(rec->name, name) == 0)
|
if (rec->name != NULL &&
|
||||||
|
g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ static GList *completion_get_settings(const char *key, SettingType type)
|
|||||||
SETTINGS_REC *rec = tmp->data;
|
SETTINGS_REC *rec = tmp->data;
|
||||||
|
|
||||||
if ((type == -1 || rec->type == type) &&
|
if ((type == -1 || rec->type == type) &&
|
||||||
g_strncasecmp(rec->key, key, len) == 0)
|
g_ascii_strncasecmp(rec->key, key, len) == 0)
|
||||||
complist = g_list_insert_sorted(complist, g_strdup(rec->key), (GCompareFunc) g_istr_cmp);
|
complist = g_list_insert_sorted(complist, g_strdup(rec->key), (GCompareFunc) g_istr_cmp);
|
||||||
}
|
}
|
||||||
g_slist_free(sets);
|
g_slist_free(sets);
|
||||||
@ -391,7 +391,7 @@ static GList *completion_get_aliases(const char *alias, char cmdchar)
|
|||||||
if (node->type != NODE_TYPE_KEY)
|
if (node->type != NODE_TYPE_KEY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_strncasecmp(node->key, alias, len) == 0) {
|
if (g_ascii_strncasecmp(node->key, alias, len) == 0) {
|
||||||
word = g_strdup_printf("%c%s", cmdchar, node->key);
|
word = g_strdup_printf("%c%s", cmdchar, node->key);
|
||||||
/* add matching alias to completion list, aliases will
|
/* add matching alias to completion list, aliases will
|
||||||
be appended after command completions and kept in
|
be appended after command completions and kept in
|
||||||
@ -422,7 +422,7 @@ static GList *completion_get_commands(const char *cmd, char cmdchar)
|
|||||||
if (strchr(rec->cmd, ' ') != NULL)
|
if (strchr(rec->cmd, ' ') != NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->cmd, cmd, len) == 0) {
|
if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0) {
|
||||||
word = cmdchar == '\0' ? g_strdup(rec->cmd) :
|
word = cmdchar == '\0' ? g_strdup(rec->cmd) :
|
||||||
g_strdup_printf("%c%s", cmdchar, rec->cmd);
|
g_strdup_printf("%c%s", cmdchar, rec->cmd);
|
||||||
if (glist_find_icase_string(complist, word) == NULL)
|
if (glist_find_icase_string(complist, word) == NULL)
|
||||||
@ -459,7 +459,7 @@ static GList *completion_get_subcommands(const char *cmd)
|
|||||||
if (strchr(rec->cmd+len, ' ') != NULL)
|
if (strchr(rec->cmd+len, ' ') != NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->cmd, cmd, len) == 0)
|
if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0)
|
||||||
complist = g_list_insert_sorted(complist, g_strdup(rec->cmd+skip), (GCompareFunc) g_istr_cmp);
|
complist = g_list_insert_sorted(complist, g_strdup(rec->cmd+skip), (GCompareFunc) g_istr_cmp);
|
||||||
}
|
}
|
||||||
return complist;
|
return complist;
|
||||||
@ -483,7 +483,7 @@ static GList *completion_get_options(const char *cmd, const char *option)
|
|||||||
for (tmp = rec->options; *tmp != NULL; tmp++) {
|
for (tmp = rec->options; *tmp != NULL; tmp++) {
|
||||||
const char *optname = *tmp + iscmdtype(**tmp);
|
const char *optname = *tmp + iscmdtype(**tmp);
|
||||||
|
|
||||||
if (len == 0 || g_strncasecmp(optname, option, len) == 0)
|
if (len == 0 || g_ascii_strncasecmp(optname, option, len) == 0)
|
||||||
list = g_list_append(list, g_strconcat("-", optname, NULL));
|
list = g_list_append(list, g_strconcat("-", optname, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -805,7 +805,7 @@ static void cmd_completion(const char *data)
|
|||||||
node = tmp->data;
|
node = tmp->data;
|
||||||
|
|
||||||
if (len == 0 ||
|
if (len == 0 ||
|
||||||
g_strncasecmp(node->key, key, len) == 0) {
|
g_ascii_strncasecmp(node->key, key, len) == 0) {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
|
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
|
||||||
TXT_COMPLETION_LINE, node->key,
|
TXT_COMPLETION_LINE, node->key,
|
||||||
config_node_get_str(node, "value", ""),
|
config_node_get_str(node, "value", ""),
|
||||||
|
@ -292,7 +292,7 @@ static void event_list_subcommands(const char *command)
|
|||||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||||
COMMAND_REC *rec = tmp->data;
|
COMMAND_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->cmd, command, len) == 0 &&
|
if (g_ascii_strncasecmp(rec->cmd, command, len) == 0 &&
|
||||||
rec->cmd[len] == ' ' &&
|
rec->cmd[len] == ' ' &&
|
||||||
strchr(rec->cmd+len+1, ' ') == NULL) {
|
strchr(rec->cmd+len+1, ' ') == NULL) {
|
||||||
g_string_append_printf(str, "%s ", rec->cmd+len+1);
|
g_string_append_printf(str, "%s ", rec->cmd+len+1);
|
||||||
|
@ -194,11 +194,11 @@ static void show_help(const char *data)
|
|||||||
items = 0;
|
items = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last != NULL && g_strcasecmp(rec->cmd, last->cmd) == 0)
|
if (last != NULL && g_ascii_strcasecmp(rec->cmd, last->cmd) == 0)
|
||||||
continue; /* don't display same command twice */
|
continue; /* don't display same command twice */
|
||||||
|
|
||||||
if ((int)strlen(rec->cmd) >= findlen &&
|
if ((int)strlen(rec->cmd) >= findlen &&
|
||||||
g_strncasecmp(rec->cmd, data, findlen) == 0) {
|
g_ascii_strncasecmp(rec->cmd, data, findlen) == 0) {
|
||||||
if (rec->cmd[findlen] == '\0') {
|
if (rec->cmd[findlen] == '\0') {
|
||||||
fullmatch = TRUE;
|
fullmatch = TRUE;
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
|
@ -66,7 +66,7 @@ static void sig_message_kick(SERVER_REC *server, const char *channel,
|
|||||||
const char *address, const char *reason)
|
const char *address, const char *reason)
|
||||||
{
|
{
|
||||||
/* never ignore if you were kicked */
|
/* never ignore if you were kicked */
|
||||||
if (g_strcasecmp(nick, server->nick) != 0 &&
|
if (g_ascii_strcasecmp(nick, server->nick) != 0 &&
|
||||||
ignore_check(server, kicker, address,
|
ignore_check(server, kicker, address,
|
||||||
channel, reason, MSGLEVEL_KICKS))
|
channel, reason, MSGLEVEL_KICKS))
|
||||||
signal_stop();
|
signal_stop();
|
||||||
|
@ -375,7 +375,7 @@ static void sig_server_disconnected(SERVER_REC *server)
|
|||||||
logitem = log->items->data;
|
logitem = log->items->data;
|
||||||
if (logitem->type == LOG_ITEM_TARGET &&
|
if (logitem->type == LOG_ITEM_TARGET &&
|
||||||
logitem->servertag != NULL &&
|
logitem->servertag != NULL &&
|
||||||
g_strcasecmp(logitem->servertag, server->tag) == 0 &&
|
g_ascii_strcasecmp(logitem->servertag, server->tag) == 0 &&
|
||||||
server_ischannel(server, logitem->name)) /* kludge again.. so we won't close dcc chats */
|
server_ischannel(server, logitem->name)) /* kludge again.. so we won't close dcc chats */
|
||||||
log_close(log);
|
log_close(log);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ static void signal_query_nick_changed(QUERY_REC *query, const char *oldnick)
|
|||||||
query->name, MSGLEVEL_NICKS, NULL);
|
query->name, MSGLEVEL_NICKS, NULL);
|
||||||
|
|
||||||
/* don't print the nick change message if only the case was changed */
|
/* don't print the nick change message if only the case was changed */
|
||||||
if (g_strcasecmp(query->name, oldnick) != 0) {
|
if (g_ascii_strcasecmp(query->name, oldnick) != 0) {
|
||||||
printformat_dest(&dest, TXT_NICK_CHANGED, oldnick,
|
printformat_dest(&dest, TXT_NICK_CHANGED, oldnick,
|
||||||
query->name, query->name,
|
query->name, query->name,
|
||||||
query->address == NULL ? "" : query->address);
|
query->address == NULL ? "" : query->address);
|
||||||
@ -160,7 +160,7 @@ static void sig_server_connected(SERVER_REC *server)
|
|||||||
|
|
||||||
if (rec->server == NULL &&
|
if (rec->server == NULL &&
|
||||||
(rec->server_tag == NULL ||
|
(rec->server_tag == NULL ||
|
||||||
g_strcasecmp(rec->server_tag, server->tag) == 0)) {
|
g_ascii_strcasecmp(rec->server_tag, server->tag) == 0)) {
|
||||||
window_item_change_server((WI_ITEM_REC *) rec, server);
|
window_item_change_server((WI_ITEM_REC *) rec, server);
|
||||||
server->queries = g_slist_append(server->queries, rec);
|
server->queries = g_slist_append(server->queries, rec);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ static void cmd_toggle(const char *data)
|
|||||||
|
|
||||||
static int config_key_compare(CONFIG_NODE *node1, CONFIG_NODE *node2)
|
static int config_key_compare(CONFIG_NODE *node1, CONFIG_NODE *node2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp(node1->key, node2->key);
|
return g_ascii_strcasecmp(node1->key, node2->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_aliases(const char *alias)
|
static void show_aliases(const char *alias)
|
||||||
@ -228,7 +228,7 @@ static void show_aliases(const char *alias)
|
|||||||
if (node->type != NODE_TYPE_KEY)
|
if (node->type != NODE_TYPE_KEY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (aliaslen != 0 && g_strncasecmp(node->key, alias, aliaslen) != 0)
|
if (aliaslen != 0 && g_ascii_strncasecmp(node->key, alias, aliaslen) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
list = g_slist_insert_sorted(list, node, (GCompareFunc) config_key_compare);
|
list = g_slist_insert_sorted(list, node, (GCompareFunc) config_key_compare);
|
||||||
|
@ -311,8 +311,8 @@ WINDOW_REC *window_find_closest(void *server, const char *name, int level)
|
|||||||
generic msgs window.
|
generic msgs window.
|
||||||
|
|
||||||
And check for prefixed !channel name --Borys */
|
And check for prefixed !channel name --Borys */
|
||||||
if (g_strcasecmp(name, item->visible_name) == 0 ||
|
if (g_ascii_strcasecmp(name, item->visible_name) == 0 ||
|
||||||
g_strcasecmp(name, (char *) window_item_get_target((WI_ITEM_REC *) item)) == 0)
|
g_ascii_strcasecmp(name, (char *) window_item_get_target((WI_ITEM_REC *) item)) == 0)
|
||||||
return namewindow;
|
return namewindow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,7 +362,8 @@ WINDOW_REC *window_find_name(const char *name)
|
|||||||
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
||||||
WINDOW_REC *rec = tmp->data;
|
WINDOW_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->name != NULL && g_strcasecmp(rec->name, name) == 0)
|
if (rec->name != NULL &&
|
||||||
|
g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -510,8 +511,8 @@ WINDOW_BIND_REC *window_bind_find(WINDOW_REC *window, const char *servertag,
|
|||||||
for (tmp = window->bound_items; tmp != NULL; tmp = tmp->next) {
|
for (tmp = window->bound_items; tmp != NULL; tmp = tmp->next) {
|
||||||
WINDOW_BIND_REC *rec = tmp->data;
|
WINDOW_BIND_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, name) == 0 &&
|
if (g_ascii_strcasecmp(rec->name, name) == 0 &&
|
||||||
g_strcasecmp(rec->servertag, servertag) == 0)
|
g_ascii_strcasecmp(rec->servertag, servertag) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,7 +544,7 @@ static void sig_server_connected(SERVER_REC *server)
|
|||||||
WINDOW_REC *rec = tmp->data;
|
WINDOW_REC *rec = tmp->data;
|
||||||
|
|
||||||
if ((rec->servertag == NULL ||
|
if ((rec->servertag == NULL ||
|
||||||
g_strcasecmp(rec->servertag, server->tag) == 0) &&
|
g_ascii_strcasecmp(rec->servertag, server->tag) == 0) &&
|
||||||
(rec->active_server == NULL ||
|
(rec->active_server == NULL ||
|
||||||
(rec == active_win && rec->items == NULL)))
|
(rec == active_win && rec->items == NULL)))
|
||||||
window_change_server(rec, server);
|
window_change_server(rec, server);
|
||||||
|
@ -55,7 +55,7 @@ int format_find_tag(const char *module, const char *tag)
|
|||||||
|
|
||||||
for (n = 0; formats[n].def != NULL; n++) {
|
for (n = 0; formats[n].def != NULL; n++) {
|
||||||
if (formats[n].tag != NULL &&
|
if (formats[n].tag != NULL &&
|
||||||
g_strcasecmp(formats[n].tag, tag) == 0)
|
g_ascii_strcasecmp(formats[n].tag, tag) == 0)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ static HILIGHT_REC *hilight_find(const char *text, char **channels)
|
|||||||
for (tmp = hilights; tmp != NULL; tmp = tmp->next) {
|
for (tmp = hilights; tmp != NULL; tmp = tmp->next) {
|
||||||
HILIGHT_REC *rec = tmp->data;
|
HILIGHT_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->text, text) != 0)
|
if (g_ascii_strcasecmp(rec->text, text) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((channels == NULL && rec->channels == NULL))
|
if ((channels == NULL && rec->channels == NULL))
|
||||||
|
@ -164,7 +164,7 @@ KEYINFO_REC *key_info_find(const char *id)
|
|||||||
for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) {
|
for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) {
|
||||||
KEYINFO_REC *rec = tmp->data;
|
KEYINFO_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->id, id) == 0)
|
if (g_ascii_strcasecmp(rec->id, id) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -661,7 +661,7 @@ static void cmd_show_keys(const char *searchkey, int full)
|
|||||||
for (key = rec->keys; key != NULL; key = key->next) {
|
for (key = rec->keys; key != NULL; key = key->next) {
|
||||||
KEY_REC *rec = key->data;
|
KEY_REC *rec = key->data;
|
||||||
|
|
||||||
if ((len == 0 || g_strncasecmp(rec->key, searchkey, len) == 0) &&
|
if ((len == 0 || g_ascii_strncasecmp(rec->key, searchkey, len) == 0) &&
|
||||||
(!full || rec->key[len] == '\0')) {
|
(!full || rec->key[len] == '\0')) {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_LIST,
|
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_LIST,
|
||||||
rec->key, rec->info->id, rec->data == NULL ? "" : rec->data);
|
rec->key, rec->info->id, rec->data == NULL ? "" : rec->data);
|
||||||
@ -739,7 +739,7 @@ static GList *completion_get_keyinfos(const char *info)
|
|||||||
for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) {
|
for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) {
|
||||||
KEYINFO_REC *rec = tmp->data;
|
KEYINFO_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strncasecmp(rec->id, info, len) == 0)
|
if (g_ascii_strncasecmp(rec->id, info, len) == 0)
|
||||||
list = g_list_append(list, g_strdup(rec->id));
|
list = g_list_append(list, g_strdup(rec->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,7 +799,7 @@ static THEME_REC *theme_find(const char *name)
|
|||||||
for (tmp = themes; tmp != NULL; tmp = tmp->next) {
|
for (tmp = themes; tmp != NULL; tmp = tmp->next) {
|
||||||
THEME_REC *rec = tmp->data;
|
THEME_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, name) == 0)
|
if (g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -970,7 +970,7 @@ typedef struct {
|
|||||||
|
|
||||||
static int theme_search_equal(THEME_SEARCH_REC *r1, THEME_SEARCH_REC *r2)
|
static int theme_search_equal(THEME_SEARCH_REC *r1, THEME_SEARCH_REC *r2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp(r1->short_name, r2->short_name);
|
return g_ascii_strcasecmp(r1->short_name, r2->short_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void theme_get_modules(char *module, FORMAT_REC *formats, GSList **list)
|
static void theme_get_modules(char *module, FORMAT_REC *formats, GSList **list)
|
||||||
@ -1001,7 +1001,7 @@ static THEME_SEARCH_REC *theme_search(GSList *list, const char *module)
|
|||||||
while (list != NULL) {
|
while (list != NULL) {
|
||||||
rec = list->data;
|
rec = list->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->short_name, module) == 0)
|
if (g_ascii_strcasecmp(rec->short_name, module) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
list = list->next;
|
list = list->next;
|
||||||
}
|
}
|
||||||
@ -1026,7 +1026,7 @@ static void theme_show(THEME_SEARCH_REC *rec, const char *key, const char *value
|
|||||||
|
|
||||||
if (formats[n].tag == NULL)
|
if (formats[n].tag == NULL)
|
||||||
last_title = text;
|
last_title = text;
|
||||||
else if ((value != NULL && key != NULL && g_strcasecmp(formats[n].tag, key) == 0) ||
|
else if ((value != NULL && key != NULL && g_ascii_strcasecmp(formats[n].tag, key) == 0) ||
|
||||||
(value == NULL && (key == NULL || stristr(formats[n].tag, key) != NULL))) {
|
(value == NULL && (key == NULL || stristr(formats[n].tag, key) != NULL))) {
|
||||||
if (first) {
|
if (first) {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_TITLE, rec->short_name, formats[0].def);
|
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_TITLE, rec->short_name, formats[0].def);
|
||||||
@ -1086,7 +1086,7 @@ static void cmd_format(const char *data)
|
|||||||
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
||||||
THEME_SEARCH_REC *rec = tmp->data;
|
THEME_SEARCH_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (module == NULL || g_strcasecmp(rec->short_name, module) == 0)
|
if (module == NULL || g_ascii_strcasecmp(rec->short_name, module) == 0)
|
||||||
theme_show(rec, key, value, reset);
|
theme_show(rec, key, value, reset);
|
||||||
}
|
}
|
||||||
g_slist_foreach(modules, (GFunc) g_free, NULL);
|
g_slist_foreach(modules, (GFunc) g_free, NULL);
|
||||||
@ -1207,7 +1207,7 @@ static void complete_format_list(THEME_SEARCH_REC *rec, const char *key, GList *
|
|||||||
for (n = 1; formats[n].def != NULL; n++) {
|
for (n = 1; formats[n].def != NULL; n++) {
|
||||||
const char *item = formats[n].tag;
|
const char *item = formats[n].tag;
|
||||||
|
|
||||||
if (item != NULL && g_strncasecmp(item, key, len) == 0)
|
if (item != NULL && g_ascii_strncasecmp(item, key, len) == 0)
|
||||||
*list = g_list_append(*list, g_strdup(item));
|
*list = g_list_append(*list, g_strdup(item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1226,7 +1226,7 @@ static GList *completion_get_formats(const char *module, const char *key)
|
|||||||
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
||||||
THEME_SEARCH_REC *rec = tmp->data;
|
THEME_SEARCH_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (*module == '\0' || g_strcasecmp(rec->short_name, module) == 0)
|
if (*module == '\0' || g_ascii_strcasecmp(rec->short_name, module) == 0)
|
||||||
complete_format_list(rec, key, &list);
|
complete_format_list(rec, key, &list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ WI_ITEM_REC *window_item_find_window(WINDOW_REC *window,
|
|||||||
WI_ITEM_REC *rec = tmp->data;
|
WI_ITEM_REC *rec = tmp->data;
|
||||||
|
|
||||||
if ((server == NULL || rec->server == server) &&
|
if ((server == NULL || rec->server == server) &&
|
||||||
g_strcasecmp(name, rec->visible_name) == 0)
|
g_ascii_strcasecmp(name, rec->visible_name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,8 +336,10 @@ static void event_away(IRC_SERVER_REC *server, const char *data)
|
|||||||
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
||||||
recoded = recode_in(SERVER(server), awaymsg, nick);
|
recoded = recode_in(SERVER(server), awaymsg, nick);
|
||||||
if (!settings_get_bool("show_away_once") ||
|
if (!settings_get_bool("show_away_once") ||
|
||||||
last_away_nick == NULL || g_strcasecmp(last_away_nick, nick) != 0 ||
|
last_away_nick == NULL ||
|
||||||
last_away_msg == NULL || g_strcasecmp(last_away_msg, awaymsg) != 0) {
|
g_ascii_strcasecmp(last_away_nick, nick) != 0 ||
|
||||||
|
last_away_msg == NULL ||
|
||||||
|
g_ascii_strcasecmp(last_away_msg, awaymsg) != 0) {
|
||||||
/* don't show the same away message
|
/* don't show the same away message
|
||||||
from the same nick all the time */
|
from the same nick all the time */
|
||||||
g_free_not_null(last_away_nick);
|
g_free_not_null(last_away_nick);
|
||||||
|
@ -209,7 +209,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
|
|||||||
params = event_get_params(data, 1, &newnick);
|
params = event_get_params(data, 1, &newnick);
|
||||||
|
|
||||||
/* NOTE: server->nick was already changed in irc/core/irc-nicklist.c */
|
/* NOTE: server->nick was already changed in irc/core/irc-nicklist.c */
|
||||||
signal_emit(g_strcasecmp(newnick, server->nick) == 0 ?
|
signal_emit(g_ascii_strcasecmp(newnick, server->nick) == 0 ?
|
||||||
"message own_nick" : "message nick", 4,
|
"message own_nick" : "message nick", 4,
|
||||||
server, newnick, sender, addr);
|
server, newnick, sender, addr);
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ static void event_connected(IRC_SERVER_REC *server)
|
|||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
nick = server->connrec->nick;
|
nick = server->connrec->nick;
|
||||||
if (g_strcasecmp(server->nick, nick) == 0)
|
if (g_ascii_strcasecmp(server->nick, nick) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* someone has our nick, find out who. */
|
/* someone has our nick, find out who. */
|
||||||
|
@ -35,7 +35,7 @@ static QUERY_REC *query_find_address(SERVER_REC *server, const char *address)
|
|||||||
QUERY_REC *rec = tmp->data;
|
QUERY_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (*rec->name != '=' && rec->address != NULL &&
|
if (*rec->name != '=' && rec->address != NULL &&
|
||||||
g_strcasecmp(address, rec->address) == 0)
|
g_ascii_strcasecmp(address, rec->address) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ static void sig_message_mode(IRC_SERVER_REC *server, const char *channel,
|
|||||||
chanrec = !group_multi_mode ? NULL :
|
chanrec = !group_multi_mode ? NULL :
|
||||||
irc_channel_find(server, channel);
|
irc_channel_find(server, channel);
|
||||||
|
|
||||||
if (chanrec != NULL && g_strcasecmp(nick, server->nick) != 0)
|
if (chanrec != NULL && g_ascii_strcasecmp(nick, server->nick) != 0)
|
||||||
msg_multi_mode(chanrec, nick, addr, mode);
|
msg_multi_mode(chanrec, nick, addr, mode);
|
||||||
else {
|
else {
|
||||||
printformat(server, channel, MSGLEVEL_MODES,
|
printformat(server, channel, MSGLEVEL_MODES,
|
||||||
|
@ -119,7 +119,7 @@ static NETJOIN_REC *netjoin_find(IRC_SERVER_REC *server, const char *nick)
|
|||||||
for (tmp = srec->netjoins; tmp != NULL; tmp = tmp->next) {
|
for (tmp = srec->netjoins; tmp != NULL; tmp = tmp->next) {
|
||||||
NETJOIN_REC *rec = tmp->data;
|
NETJOIN_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->nick, nick) == 0)
|
if (g_ascii_strcasecmp(rec->nick, nick) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ static GSList *get_source_servers(const char *server, GSList **servers)
|
|||||||
NETSPLIT_SERVER_REC *rec = tmp->data;
|
NETSPLIT_SERVER_REC *rec = tmp->data;
|
||||||
next = tmp->next;
|
next = tmp->next;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->server, server) == 0) {
|
if (g_ascii_strcasecmp(rec->server, server) == 0) {
|
||||||
rec->prints = 0;
|
rec->prints = 0;
|
||||||
list = g_slist_append(list, rec);
|
list = g_slist_append(list, rec);
|
||||||
*servers = g_slist_remove(*servers, rec);
|
*servers = g_slist_remove(*servers, rec);
|
||||||
@ -91,7 +91,7 @@ static TEMP_SPLIT_CHAN_REC *find_split_chan(TEMP_SPLIT_REC *rec,
|
|||||||
for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) {
|
||||||
TEMP_SPLIT_CHAN_REC *chanrec = tmp->data;
|
TEMP_SPLIT_CHAN_REC *chanrec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(chanrec->name, name) == 0)
|
if (g_ascii_strcasecmp(chanrec->name, name) == 0)
|
||||||
return chanrec;
|
return chanrec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ static void sig_netsplit_servers(void)
|
|||||||
|
|
||||||
static int split_equal(NETSPLIT_REC *n1, NETSPLIT_REC *n2)
|
static int split_equal(NETSPLIT_REC *n1, NETSPLIT_REC *n2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp(n1->nick, n2->nick);
|
return g_ascii_strcasecmp(n1->nick, n2->nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void split_get(void *key, NETSPLIT_REC *rec, GSList **list)
|
static void split_get(void *key, NETSPLIT_REC *rec, GSList **list)
|
||||||
|
@ -150,7 +150,7 @@ void ban_remove(IRC_CHANNEL_REC *channel, const char *bans)
|
|||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
rec = NULL;
|
rec = NULL;
|
||||||
if (!g_strcasecmp(*ban, BAN_LAST)) {
|
if (!g_ascii_strcasecmp(*ban, BAN_LAST)) {
|
||||||
/* unnbanning last set ban */
|
/* unnbanning last set ban */
|
||||||
rec = g_slist_nth_data(channel->banlist,
|
rec = g_slist_nth_data(channel->banlist,
|
||||||
g_slist_length(channel->banlist) - 1);
|
g_slist_length(channel->banlist) - 1);
|
||||||
|
@ -199,7 +199,7 @@ static IRC_CHANNEL_REC *channel_find_unjoined(IRC_SERVER_REC *server,
|
|||||||
if (!IS_IRC_CHANNEL(rec) || rec->joined)
|
if (!IS_IRC_CHANNEL(rec) || rec->joined)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_strncasecmp(channel, rec->name, len) == 0 &&
|
if (g_ascii_strncasecmp(channel, rec->name, len) == 0 &&
|
||||||
(len > 20 || rec->name[len] == '\0'))
|
(len > 20 || rec->name[len] == '\0'))
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, const char *nic
|
|||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) != 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) != 0) {
|
||||||
/* someone else joined channel, no need to do anything */
|
/* someone else joined channel, no need to do anything */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ static void event_part(IRC_SERVER_REC *server, const char *data, const char *nic
|
|||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) != 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) != 0) {
|
||||||
/* someone else part, no need to do anything here */
|
/* someone else part, no need to do anything here */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data)
|
|||||||
|
|
||||||
params = event_get_params(data, 3, &channel, &nick, &reason);
|
params = event_get_params(data, 3, &channel, &nick, &reason);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) != 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) != 0) {
|
||||||
/* someone else was kicked, no need to do anything */
|
/* someone else was kicked, no need to do anything */
|
||||||
g_free(params);
|
g_free(params);
|
||||||
return;
|
return;
|
||||||
|
@ -58,7 +58,7 @@ static REJOIN_REC *rejoin_find(IRC_SERVER_REC *server, const char *channel)
|
|||||||
for (tmp = server->rejoin_channels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = server->rejoin_channels; tmp != NULL; tmp = tmp->next) {
|
||||||
REJOIN_REC *rec = tmp->data;
|
REJOIN_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->channel, channel) == 0)
|
if (g_ascii_strcasecmp(rec->channel, channel) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ static CTCP_CMD_REC *ctcp_cmd_find(const char *name)
|
|||||||
for (tmp = ctcp_cmds; tmp != NULL; tmp = tmp->next) {
|
for (tmp = ctcp_cmds; tmp != NULL; tmp = tmp->next) {
|
||||||
CTCP_CMD_REC *rec = tmp->data;
|
CTCP_CMD_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, name) == 0)
|
if (g_ascii_strcasecmp(rec->name, name) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server,
|
|||||||
g_string_printf(tmpstr, "WHOIS %s", query);
|
g_string_printf(tmpstr, "WHOIS %s", query);
|
||||||
else {
|
else {
|
||||||
g_string_printf(tmpstr, "WHOIS %s %s", qserver, query);
|
g_string_printf(tmpstr, "WHOIS %s %s", qserver, query);
|
||||||
if (g_strcasecmp(qserver, query) == 0)
|
if (g_ascii_strcasecmp(qserver, query) == 0)
|
||||||
event_402 = "whois event not found";
|
event_402 = "whois event not found";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
|
|||||||
{
|
{
|
||||||
g_return_if_fail(nick != NULL);
|
g_return_if_fail(nick != NULL);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) != 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) != 0) {
|
||||||
g_free_not_null(last_join);
|
g_free_not_null(last_join);
|
||||||
last_join = g_strdup(nick);
|
last_join = g_strdup(nick);
|
||||||
}
|
}
|
||||||
|
@ -342,9 +342,9 @@ static void event_nick_in_use(IRC_SERVER_REC *server, const char *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* nick already in use - need to change it .. */
|
/* nick already in use - need to change it .. */
|
||||||
if (g_strcasecmp(server->nick, server->connrec->nick) == 0 &&
|
if (g_ascii_strcasecmp(server->nick, server->connrec->nick) == 0 &&
|
||||||
server->connrec->alternate_nick != NULL &&
|
server->connrec->alternate_nick != NULL &&
|
||||||
g_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) {
|
g_ascii_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) {
|
||||||
/* first try, so try the alternative nick.. */
|
/* first try, so try the alternative nick.. */
|
||||||
g_free(server->nick);
|
g_free(server->nick);
|
||||||
server->nick = g_strdup(server->connrec->alternate_nick);
|
server->nick = g_strdup(server->connrec->alternate_nick);
|
||||||
@ -400,10 +400,10 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
|
|||||||
|
|
||||||
params = event_get_params(data, 1, &nick);
|
params = event_get_params(data, 1, &nick);
|
||||||
|
|
||||||
if (g_strcasecmp(orignick, server->nick) == 0) {
|
if (g_ascii_strcasecmp(orignick, server->nick) == 0) {
|
||||||
/* You changed your nick */
|
/* You changed your nick */
|
||||||
if (server->last_nick != NULL &&
|
if (server->last_nick != NULL &&
|
||||||
g_strcasecmp(server->last_nick, nick) == 0) {
|
g_ascii_strcasecmp(server->last_nick, nick) == 0) {
|
||||||
/* changed with /NICK - keep it as wanted nick */
|
/* changed with /NICK - keep it as wanted nick */
|
||||||
g_free(server->connrec->nick);
|
g_free(server->connrec->nick);
|
||||||
server->connrec->nick = g_strdup(nick);
|
server->connrec->nick = g_strdup(nick);
|
||||||
|
@ -90,7 +90,8 @@ static void send_message(SERVER_REC *server, const char *target,
|
|||||||
if (*target == '!') {
|
if (*target == '!') {
|
||||||
/* !chan -> !12345chan */
|
/* !chan -> !12345chan */
|
||||||
channel = channel_find(server, target);
|
channel = channel_find(server, target);
|
||||||
if (channel != NULL && g_strcasecmp(channel->name, target) != 0)
|
if (channel != NULL &&
|
||||||
|
g_ascii_strcasecmp(channel->name, target) != 0)
|
||||||
target = channel->name;
|
target = channel->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
|
|||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) == 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) == 0) {
|
||||||
/* You joined, no need to do anything here */
|
/* You joined, no need to do anything here */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ static void event_part(IRC_SERVER_REC *server, const char *data,
|
|||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) == 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) == 0) {
|
||||||
/* you left channel, no need to do anything here */
|
/* you left channel, no need to do anything here */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ static void event_quit(IRC_SERVER_REC *server, const char *data,
|
|||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) == 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) == 0) {
|
||||||
/* you quit, don't do anything here */
|
/* you quit, don't do anything here */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data)
|
|||||||
|
|
||||||
params = event_get_params(data, 3, &channel, &nick, &reason);
|
params = event_get_params(data, 3, &channel, &nick, &reason);
|
||||||
|
|
||||||
if (g_strcasecmp(nick, server->nick) == 0) {
|
if (g_ascii_strcasecmp(nick, server->nick) == 0) {
|
||||||
/* you were kicked, no need to do anything */
|
/* you were kicked, no need to do anything */
|
||||||
g_free(params);
|
g_free(params);
|
||||||
return;
|
return;
|
||||||
|
@ -53,7 +53,7 @@ BAN_REC *banlist_find(GSList *list, const char *ban)
|
|||||||
for (tmp = list; tmp != NULL; tmp = tmp->next) {
|
for (tmp = list; tmp != NULL; tmp = tmp->next) {
|
||||||
BAN_REC *rec = tmp->data;
|
BAN_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->ban, ban) == 0)
|
if (g_ascii_strcasecmp(rec->ban, ban) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ void modes_type_prefix(IRC_CHANNEL_REC *channel, const char *setby,
|
|||||||
{
|
{
|
||||||
int umode = (unsigned char) mode;
|
int umode = (unsigned char) mode;
|
||||||
|
|
||||||
if (g_strcasecmp(channel->server->nick, arg) == 0) {
|
if (g_ascii_strcasecmp(channel->server->nick, arg) == 0) {
|
||||||
/* see if we need to update channel->chanop */
|
/* see if we need to update channel->chanop */
|
||||||
const char *prefix =
|
const char *prefix =
|
||||||
g_hash_table_lookup(channel->server->isupport, "PREFIX");
|
g_hash_table_lookup(channel->server->isupport, "PREFIX");
|
||||||
@ -692,7 +692,7 @@ static int get_wildcard_nicks(GString *output, const char *mask,
|
|||||||
(voice == 1 && !rec->voice) || (voice == 0 && rec->voice))
|
(voice == 1 && !rec->voice) || (voice == 0 && rec->voice))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->nick, channel->server->nick) == 0)
|
if (g_ascii_strcasecmp(rec->nick, channel->server->nick) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
g_string_append_printf(output, "%s ", rec->nick);
|
g_string_append_printf(output, "%s ", rec->nick);
|
||||||
@ -859,7 +859,7 @@ static void cmd_mode(const char *data, IRC_SERVER_REC *server,
|
|||||||
} else if (ischannel(*target))
|
} else if (ischannel(*target))
|
||||||
channel_set_mode(server, target, mode);
|
channel_set_mode(server, target, mode);
|
||||||
else {
|
else {
|
||||||
if (g_strcasecmp(target, server->nick) == 0) {
|
if (g_ascii_strcasecmp(target, server->nick) == 0) {
|
||||||
server_redirect_event(server, "mode user", 1, target, -1, NULL,
|
server_redirect_event(server, "mode user", 1, target, -1, NULL,
|
||||||
"event mode", "requested usermode change", NULL);
|
"event mode", "requested usermode change", NULL);
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,8 @@ static NETSPLIT_SERVER_REC *netsplit_server_find(IRC_SERVER_REC *server,
|
|||||||
for (tmp = server->split_servers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = server->split_servers; tmp != NULL; tmp = tmp->next) {
|
||||||
NETSPLIT_SERVER_REC *rec = tmp->data;
|
NETSPLIT_SERVER_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->server, servername) == 0 &&
|
if (g_ascii_strcasecmp(rec->server, servername) == 0 &&
|
||||||
g_strcasecmp(rec->destserver, destserver) == 0)
|
g_ascii_strcasecmp(rec->destserver, destserver) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ NETSPLIT_REC *netsplit_find(IRC_SERVER_REC *server, const char *nick,
|
|||||||
if (rec == NULL) return NULL;
|
if (rec == NULL) return NULL;
|
||||||
|
|
||||||
return (address == NULL ||
|
return (address == NULL ||
|
||||||
g_strcasecmp(rec->address, address) == 0) ? rec : NULL;
|
g_ascii_strcasecmp(rec->address, address) == 0) ? rec : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
|
NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
|
||||||
@ -211,7 +211,7 @@ NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
|
|||||||
for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) {
|
||||||
NETSPLIT_CHAN_REC *rec = tmp->data;
|
NETSPLIT_CHAN_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->name, channel) == 0)
|
if (g_ascii_strcasecmp(rec->name, channel) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
|
|||||||
/* check if split is over */
|
/* check if split is over */
|
||||||
rec = g_hash_table_lookup(server->splits, nick);
|
rec = g_hash_table_lookup(server->splits, nick);
|
||||||
|
|
||||||
if (rec != NULL && g_strcasecmp(rec->address, address) == 0) {
|
if (rec != NULL && g_ascii_strcasecmp(rec->address, address) == 0) {
|
||||||
/* yep, looks like it is. for same people that had the same
|
/* yep, looks like it is. for same people that had the same
|
||||||
splitted servers set the timeout to one minute.
|
splitted servers set the timeout to one minute.
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ static void event_quit(IRC_SERVER_REC *server, const char *data,
|
|||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
if (*data == ':') data++;
|
if (*data == ':') data++;
|
||||||
if (g_strcasecmp(nick, server->nick) != 0 && quitmsg_is_split(data)) {
|
if (g_ascii_strcasecmp(nick, server->nick) != 0 && quitmsg_is_split(data)) {
|
||||||
/* netsplit! */
|
/* netsplit! */
|
||||||
netsplit_add(server, nick, address, data);
|
netsplit_add(server, nick, address, data);
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ CHAT_DCC_REC *dcc_chat_find_id(const char *id)
|
|||||||
CHAT_DCC_REC *dcc = tmp->data;
|
CHAT_DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
if (IS_DCC_CHAT(dcc) && dcc->id != NULL &&
|
if (IS_DCC_CHAT(dcc) && dcc->id != NULL &&
|
||||||
g_strcasecmp(dcc->id, id) == 0)
|
g_ascii_strcasecmp(dcc->id, id) == 0)
|
||||||
return dcc;
|
return dcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ static CHAT_DCC_REC *dcc_chat_find_nick(IRC_SERVER_REC *server,
|
|||||||
CHAT_DCC_REC *dcc = tmp->data;
|
CHAT_DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
if (IS_DCC_CHAT(dcc) && dcc->server == server &&
|
if (IS_DCC_CHAT(dcc) && dcc->server == server &&
|
||||||
g_strcasecmp(dcc->nick, nick) == 0)
|
g_ascii_strcasecmp(dcc->nick, nick) == 0)
|
||||||
return dcc;
|
return dcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,7 +562,7 @@ static void cmd_dcc_close(char *data, SERVER_REC *server)
|
|||||||
|
|
||||||
next = tmp->next;
|
next = tmp->next;
|
||||||
if (IS_DCC_CHAT(dcc) && dcc->id != NULL &&
|
if (IS_DCC_CHAT(dcc) && dcc->id != NULL &&
|
||||||
g_strcasecmp(dcc->id, nick) == 0) {
|
g_ascii_strcasecmp(dcc->id, nick) == 0) {
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
if (!dcc_is_connected(dcc) && IS_IRC_SERVER(server))
|
if (!dcc_is_connected(dcc) && IS_IRC_SERVER(server))
|
||||||
dcc_reject(DCC(dcc), IRC_SERVER(server));
|
dcc_reject(DCC(dcc), IRC_SERVER(server));
|
||||||
@ -777,7 +777,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
|
|||||||
g_return_if_fail(orignick != NULL);
|
g_return_if_fail(orignick != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 1, &nick);
|
params = event_get_params(data, 1, &nick);
|
||||||
if (g_strcasecmp(nick, orignick) == 0) {
|
if (g_ascii_strcasecmp(nick, orignick) == 0) {
|
||||||
/* shouldn't happen, but just to be sure irssi doesn't
|
/* shouldn't happen, but just to be sure irssi doesn't
|
||||||
get into infinite loop */
|
get into infinite loop */
|
||||||
g_free(params);
|
g_free(params);
|
||||||
|
@ -549,7 +549,7 @@ void cmd_dcc_receive(const char *data, DCC_GET_FUNC accept_func,
|
|||||||
GET_DCC_REC *dcc = tmp->data;
|
GET_DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
next = tmp->next;
|
next = tmp->next;
|
||||||
if (IS_DCC_GET(dcc) && g_strcasecmp(dcc->nick, nick) == 0 &&
|
if (IS_DCC_GET(dcc) && g_ascii_strcasecmp(dcc->nick, nick) == 0 &&
|
||||||
(dcc_is_waiting_user(dcc) || dcc->from_dccserver) &&
|
(dcc_is_waiting_user(dcc) || dcc->from_dccserver) &&
|
||||||
(*fname == '\0' || strcmp(dcc->arg, fname) == 0)) {
|
(*fname == '\0' || strcmp(dcc->arg, fname) == 0)) {
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
|
@ -47,11 +47,12 @@ int dcc_queue_old(const char *nick, const char *servertag)
|
|||||||
if (rec == NULL)
|
if (rec == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (*nick != '\0' && g_strcasecmp(nick, rec->nick) != 0)
|
if (*nick != '\0' &&
|
||||||
|
g_ascii_strcasecmp(nick, rec->nick) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (*servertag != '\0' &&
|
if (*servertag != '\0' &&
|
||||||
g_strcasecmp(servertag, rec->servertag) != 0)
|
g_ascii_strcasecmp(servertag, rec->servertag) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* found a queue matching nick/server! */
|
/* found a queue matching nick/server! */
|
||||||
|
@ -37,7 +37,8 @@ static FILE_DCC_REC *dcc_resume_find(int type, const char *nick, int port)
|
|||||||
FILE_DCC_REC *dcc = tmp->data;
|
FILE_DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
if (dcc->type == type && !dcc_is_connected(dcc) &&
|
if (dcc->type == type && !dcc_is_connected(dcc) &&
|
||||||
dcc->port == port && g_strcasecmp(dcc->nick, nick) == 0)
|
dcc->port == port &&
|
||||||
|
g_ascii_strcasecmp(dcc->nick, nick) == 0)
|
||||||
return dcc;
|
return dcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server,
|
|||||||
|
|
||||||
chat = item_get_dcc(item);
|
chat = item_get_dcc(item);
|
||||||
if (chat != NULL &&
|
if (chat != NULL &&
|
||||||
(chat->mirc_ctcp || g_strcasecmp(nick, chat->nick) != 0))
|
(chat->mirc_ctcp || g_ascii_strcasecmp(nick, chat->nick) != 0))
|
||||||
chat = NULL;
|
chat = NULL;
|
||||||
|
|
||||||
if (IS_IRC_SERVER(server) && server->connected)
|
if (IS_IRC_SERVER(server) && server->connected)
|
||||||
|
@ -148,7 +148,7 @@ DCC_REC *dcc_find_request(int type, const char *nick, const char *arg)
|
|||||||
DCC_REC *dcc = tmp->data;
|
DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
if (dcc->type == type && !dcc_is_connected(dcc) &&
|
if (dcc->type == type && !dcc_is_connected(dcc) &&
|
||||||
g_strcasecmp(dcc->nick, nick) == 0 &&
|
g_ascii_strcasecmp(dcc->nick, nick) == 0 &&
|
||||||
(arg == NULL || strcmp(dcc->arg, arg) == 0))
|
(arg == NULL || strcmp(dcc->arg, arg) == 0))
|
||||||
return dcc;
|
return dcc;
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ static void sig_connected(IRC_SERVER_REC *server)
|
|||||||
DCC_REC *dcc = tmp->data;
|
DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
if (dcc->server == NULL && dcc->servertag != NULL &&
|
if (dcc->server == NULL && dcc->servertag != NULL &&
|
||||||
g_strcasecmp(dcc->servertag, server->tag) == 0) {
|
g_ascii_strcasecmp(dcc->servertag, server->tag) == 0) {
|
||||||
dcc->server = server;
|
dcc->server = server;
|
||||||
g_free(dcc->mynick);
|
g_free(dcc->mynick);
|
||||||
dcc->mynick = g_strdup(server->nick);
|
dcc->mynick = g_strdup(server->nick);
|
||||||
@ -479,7 +479,7 @@ static void event_no_such_nick(IRC_SERVER_REC *server, char *data)
|
|||||||
|
|
||||||
next = tmp->next;
|
next = tmp->next;
|
||||||
if (!dcc_is_connected(dcc) && dcc->server == server &&
|
if (!dcc_is_connected(dcc) && dcc->server == server &&
|
||||||
dcc->nick != NULL && g_strcasecmp(dcc->nick, nick) == 0)
|
dcc->nick != NULL && g_ascii_strcasecmp(dcc->nick, nick) == 0)
|
||||||
dcc_close(dcc);
|
dcc_close(dcc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ static void cmd_dcc_close(char *data, IRC_SERVER_REC *server)
|
|||||||
DCC_REC *dcc = tmp->data;
|
DCC_REC *dcc = tmp->data;
|
||||||
|
|
||||||
next = tmp->next;
|
next = tmp->next;
|
||||||
if (dcc->type == type && g_strcasecmp(dcc->nick, nick) == 0 &&
|
if (dcc->type == type && g_ascii_strcasecmp(dcc->nick, nick) == 0 &&
|
||||||
(*arg == '\0' || strcmp(dcc->arg, arg) == 0)) {
|
(*arg == '\0' || strcmp(dcc->arg, arg) == 0)) {
|
||||||
dcc_reject(dcc, server);
|
dcc_reject(dcc, server);
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
|
@ -172,7 +172,7 @@ static FLOOD_ITEM_REC *flood_find(FLOOD_REC *flood, int level,
|
|||||||
FLOOD_ITEM_REC *rec = tmp->data;
|
FLOOD_ITEM_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->level == level &&
|
if (rec->level == level &&
|
||||||
g_strcasecmp(rec->target, target) == 0)
|
g_ascii_strcasecmp(rec->target, target) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ static void flood_privmsg(IRC_SERVER_REC *server, const char *data,
|
|||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
if (addr == NULL || g_strcasecmp(nick, server->nick) == 0)
|
if (addr == NULL || g_ascii_strcasecmp(nick, server->nick) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
params = event_get_params(data, 2, &target, &text);
|
params = event_get_params(data, 2, &target, &text);
|
||||||
@ -265,7 +265,7 @@ static void flood_notice(IRC_SERVER_REC *server, const char *data,
|
|||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
if (addr == NULL || g_strcasecmp(nick, server->nick) == 0)
|
if (addr == NULL || g_ascii_strcasecmp(nick, server->nick) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
params = event_get_params(data, 2, &target, &text);
|
params = event_get_params(data, 2, &target, &text);
|
||||||
@ -283,7 +283,7 @@ static void flood_ctcp(IRC_SERVER_REC *server, const char *data,
|
|||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
if (addr == NULL || g_strcasecmp(nick, server->nick) == 0)
|
if (addr == NULL || g_ascii_strcasecmp(nick, server->nick) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
level = g_ascii_strncasecmp(data, "ACTION ", 7) != 0 ? MSGLEVEL_CTCPS :
|
level = g_ascii_strncasecmp(data, "ACTION ", 7) != 0 ? MSGLEVEL_CTCPS :
|
||||||
|
@ -69,7 +69,7 @@ NOTIFY_NICK_REC *notify_nick_find(IRC_SERVER_REC *server, const char *nick)
|
|||||||
for (tmp = mserver->notify_users; tmp != NULL; tmp = tmp->next) {
|
for (tmp = mserver->notify_users; tmp != NULL; tmp = tmp->next) {
|
||||||
rec = tmp->data;
|
rec = tmp->data;
|
||||||
|
|
||||||
if (g_strcasecmp(rec->nick, nick) == 0)
|
if (g_ascii_strcasecmp(rec->nick, nick) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ int notifylist_ircnets_match(NOTIFYLIST_REC *rec, const char *ircnet)
|
|||||||
if (strcmp(ircnet, "*") == 0) return TRUE;
|
if (strcmp(ircnet, "*") == 0) return TRUE;
|
||||||
|
|
||||||
for (tmp = rec->ircnets; *tmp != NULL; tmp++) {
|
for (tmp = rec->ircnets; *tmp != NULL; tmp++) {
|
||||||
if (g_strcasecmp(*tmp, ircnet) == 0)
|
if (g_ascii_strcasecmp(*tmp, ircnet) == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ NOTIFYLIST_REC *notifylist_find(const char *mask, const char *ircnet)
|
|||||||
NOTIFYLIST_REC *rec = tmp->data;
|
NOTIFYLIST_REC *rec = tmp->data;
|
||||||
|
|
||||||
/* check mask */
|
/* check mask */
|
||||||
if (g_strncasecmp(rec->mask, mask, len) != 0 ||
|
if (g_ascii_strncasecmp(rec->mask, mask, len) != 0 ||
|
||||||
(rec->mask[len] != '\0' && rec->mask[len] != '!')) continue;
|
(rec->mask[len] != '\0' && rec->mask[len] != '!')) continue;
|
||||||
|
|
||||||
/* check ircnet */
|
/* check ircnet */
|
||||||
|
@ -152,8 +152,8 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args,
|
|||||||
|
|
||||||
params = event_get_params(args, 2, &origin, &target);
|
params = event_get_params(args, 2, &origin, &target);
|
||||||
if (*target == '\0' ||
|
if (*target == '\0' ||
|
||||||
g_strcasecmp(target, client->proxy_address) == 0 ||
|
g_ascii_strcasecmp(target, client->proxy_address) == 0 ||
|
||||||
g_strcasecmp(target, client->nick) == 0) {
|
g_ascii_strcasecmp(target, client->nick) == 0) {
|
||||||
proxy_outdata(client, ":%s PONG %s :%s\n",
|
proxy_outdata(client, ":%s PONG %s :%s\n",
|
||||||
client->proxy_address,
|
client->proxy_address,
|
||||||
client->proxy_address, origin);
|
client->proxy_address, origin);
|
||||||
@ -169,7 +169,7 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args,
|
|||||||
client->want_ctcp = 1;
|
client->want_ctcp = 1;
|
||||||
for (tmp = proxy_clients; tmp != NULL; tmp = tmp->next) {
|
for (tmp = proxy_clients; tmp != NULL; tmp = tmp->next) {
|
||||||
CLIENT_REC *rec = tmp->data;
|
CLIENT_REC *rec = tmp->data;
|
||||||
if ((g_strcasecmp(client->listen->ircnet,rec->listen->ircnet) == 0) &&
|
if ((g_ascii_strcasecmp(client->listen->ircnet,rec->listen->ircnet) == 0) &&
|
||||||
/* kludgy way to check if the clients aren't the same */
|
/* kludgy way to check if the clients aren't the same */
|
||||||
(client->recv_tag != rec->recv_tag)) {
|
(client->recv_tag != rec->recv_tag)) {
|
||||||
if (rec->want_ctcp == 1)
|
if (rec->want_ctcp == 1)
|
||||||
@ -463,7 +463,7 @@ static void event_connected(IRC_SERVER_REC *server)
|
|||||||
if (rec->connected && rec->server == NULL &&
|
if (rec->connected && rec->server == NULL &&
|
||||||
(strcmp(rec->listen->ircnet, "*") == 0 ||
|
(strcmp(rec->listen->ircnet, "*") == 0 ||
|
||||||
(chatnet != NULL &&
|
(chatnet != NULL &&
|
||||||
g_strcasecmp(chatnet, rec->listen->ircnet) == 0))) {
|
g_ascii_strcasecmp(chatnet, rec->listen->ircnet) == 0))) {
|
||||||
proxy_outdata(rec, ":%s NOTICE %s :Connected to server\n",
|
proxy_outdata(rec, ":%s NOTICE %s :Connected to server\n",
|
||||||
rec->proxy_address, rec->nick);
|
rec->proxy_address, rec->nick);
|
||||||
rec->server = server;
|
rec->server = server;
|
||||||
@ -514,7 +514,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
|
|||||||
if (!IS_IRC_SERVER(server))
|
if (!IS_IRC_SERVER(server))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g_strcasecmp(orignick, server->nick) != 0)
|
if (g_ascii_strcasecmp(orignick, server->nick) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (*data == ':') data++;
|
if (*data == ':') data++;
|
||||||
@ -566,7 +566,7 @@ static LISTEN_REC *find_listen(const char *ircnet, int port)
|
|||||||
LISTEN_REC *rec = tmp->data;
|
LISTEN_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->port == port &&
|
if (rec->port == port &&
|
||||||
g_strcasecmp(rec->ircnet, ircnet) == 0)
|
g_ascii_strcasecmp(rec->ircnet, ircnet) == 0)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ CONFIG_NODE *config_node_find(CONFIG_NODE *node, const char *key)
|
|||||||
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
|
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
|
||||||
CONFIG_NODE *node = tmp->data;
|
CONFIG_NODE *node = tmp->data;
|
||||||
|
|
||||||
if (node->key != NULL && g_strcasecmp(node->key, key) == 0)
|
if (node->key != NULL && g_ascii_strcasecmp(node->key, key) == 0)
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
static int g_istr_equal(gconstpointer v, gconstpointer v2)
|
static int g_istr_equal(gconstpointer v, gconstpointer v2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp((const char *) v, (const char *) v2) == 0;
|
return g_ascii_strcasecmp((const char *) v, (const char *) v2) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a char* hash function from ASU */
|
/* a char* hash function from ASU */
|
||||||
|
@ -262,7 +262,7 @@ CODE:
|
|||||||
|
|
||||||
for (i = 0; formats[i].def != NULL; i++) {
|
for (i = 0; formats[i].def != NULL; i++) {
|
||||||
if (formats[i].tag != NULL &&
|
if (formats[i].tag != NULL &&
|
||||||
g_strcasecmp(formats[i].tag, tag) == 0)
|
g_ascii_strcasecmp(formats[i].tag, tag) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user