isupport patch by David Leadbeater

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3211 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-01-20 10:57:57 +00:00 committed by cras
commit 217283caea
30 changed files with 520 additions and 133 deletions

View file

@ -82,10 +82,19 @@ static char *expando_usermode(SERVER_REC *server, void *item, int *free_ret)
return IS_IRC_SERVER(server) ? IRC_SERVER(server)->usermode : "";
}
/* expands to your usermode on channel, op '@', halfop '%', "+" voice */
/* expands to your usermode on channel, op '@', halfop '%', "+" voice or other */
static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret)
{
if (IS_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) {
char other = NICK(CHANNEL(item)->ownnick)->other;
if (other != '\0') {
char *cumode = g_malloc(2);
cumode[0] = other;
cumode[1] = '\0';
*free_ret = TRUE;
return cumode;
}
return NICK(CHANNEL(item)->ownnick)->op ? "@" :
NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";