mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 23:52:22 +02:00
Allow storing multiple "other" prefixes such as +q and +a.
Original patch by JasonX, somewhat changed by exg and me. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4922 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
aefa7b47c1
commit
89cd47bf3a
15 changed files with 110 additions and 88 deletions
|
|
@ -86,18 +86,12 @@ static char *expando_usermode(SERVER_REC *server, void *item, int *free_ret)
|
|||
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 ? "+" : "";
|
||||
char prefix = NICK(CHANNEL(item)->ownnick)->prefixes[0];
|
||||
char *cumode = g_malloc(2);
|
||||
cumode[0] = prefix;
|
||||
cumode[1] = '\0';
|
||||
*free_ret = TRUE;
|
||||
return cumode; /* will be "\0\0" = "" if there is no prefix */
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue