mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 07:02:12 +02:00
Correctly alias 'channel' to '#channel'
Use the same approach used in 'irc_channels_join'. Remove 'irc_nick_strip' since it was unused.
This commit is contained in:
parent
fbb838b3b0
commit
d7ef9c590f
3 changed files with 15 additions and 29 deletions
|
|
@ -55,30 +55,6 @@ NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
|
|||
return rec;
|
||||
}
|
||||
|
||||
#define isnickchar(a) \
|
||||
(i_isalnum(a) || (a) == '`' || (a) == '-' || (a) == '_' || \
|
||||
(a) == '[' || (a) == ']' || (a) == '{' || (a) == '}' || \
|
||||
(a) == '|' || (a) == '\\' || (a) == '^')
|
||||
|
||||
/* Remove all "extra" characters from `nick'. Like _nick_ -> nick */
|
||||
char *irc_nick_strip(const char *nick)
|
||||
{
|
||||
char *stripped, *spos;
|
||||
|
||||
g_return_val_if_fail(nick != NULL, NULL);
|
||||
|
||||
spos = stripped = g_strdup(nick);
|
||||
while (isnickchar(*nick)) {
|
||||
if (i_isalnum(*nick))
|
||||
*spos++ = *nick;
|
||||
nick++;
|
||||
}
|
||||
if ((unsigned char) *nick >= 128)
|
||||
*spos++ = *nick; /* just add it so that nicks won't match.. */
|
||||
*spos = '\0';
|
||||
return stripped;
|
||||
}
|
||||
|
||||
int irc_nickcmp_rfc1459(const char *m, const char *n)
|
||||
{
|
||||
while (*m != '\0' && *n != '\0') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue