~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to src/irc/core/irc-expandos.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-05-05 15:50:50 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505155050-aoqlnpes7che9rtd
Tags: 0.8.13-1ubuntu1
* Merge from debian unstable (LP: #372411), remaining changes:
  - debian/patches: 03firsttimer_text
    + Adapt it so it tells you about connecting to irc.ubuntu.com and
      joining #ubuntu instead of irc.debian.org and #debian.
  - debian/patches: 90irc-ubuntu-com
* Fixed debian/patches/90irc-ubuntu-com for new irssi.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret)
87
87
{
88
88
        if (IS_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) {
89
 
                char other = NICK(CHANNEL(item)->ownnick)->other;
90
 
                if (other != '\0') {
91
 
                        char *cumode = g_malloc(2);
92
 
                        cumode[0] = other;
93
 
                        cumode[1] = '\0';
94
 
                        *free_ret = TRUE;
95
 
                        return cumode;
96
 
                }
97
 
 
98
 
                return NICK(CHANNEL(item)->ownnick)->op ? "@" :
99
 
                       NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
100
 
                       NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
 
89
                char prefix = NICK(CHANNEL(item)->ownnick)->prefixes[0];
 
90
                char *cumode = g_malloc(2);
 
91
                cumode[0] = prefix;
 
92
                cumode[1] = '\0';
 
93
                *free_ret = TRUE;
 
94
                return cumode; /* will be "\0\0" = "" if there is no prefix */
101
95
        }
102
96
        return "";
103
97
}