Changeset 29ff5c2 for irc_channel.c


Ignore:
Timestamp:
2015-11-21T00:01:50Z (8 years ago)
Author:
dequis <dx@…>
Parents:
e4f08bf (diff), 8fdeaa5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feat/hip-cat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    re4f08bf r29ff5c2  
    429429}
    430430
     431char irc_channel_user_get_prefix(irc_channel_user_t *icu)
     432{
     433        if (icu->flags & IRC_CHANNEL_USER_OP) {
     434                return '@';
     435        } else if (icu->flags & IRC_CHANNEL_USER_HALFOP) {
     436                return '%';
     437        } else if (icu->flags & IRC_CHANNEL_USER_VOICE) {
     438                return '+';
     439        }
     440        return 0;
     441}
     442
    431443void irc_channel_auto_joins(irc_t *irc, account_t *acc)
    432444{
     
    445457                        char *acc_s;
    446458
    447                         if (!aj || (ic->flags & IRC_CHANNEL_JOINED)) {
    448                                 /* Only continue if this one's marked as auto_join
    449                                    or if we're in it already. (Possible if the
    450                                    client auto-rejoined it before identyfing.) */
     459                        if (!aj && !(ic->flags & IRC_CHANNEL_JOINED)) {
     460                                /* Only proceed if this one's marked as auto_join
     461                                   or if we're in it already. (Very likely the IRC
     462                                   client auto-(re)joining at reconnect time.) */
    451463                                continue;
    452464                        } else if (!(acc_s = set_getstr(&ic->set, "account"))) {
     
    593605
    594606        translit_name = g_convert_with_fallback(hint, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, &bytes_written, NULL);
     607
     608        if (!translit_name) {
     609                /* Same thing as in nick_gen() in nick.c, try again without //TRANSLIT */
     610                translit_name = g_convert_with_fallback(hint, -1, "ASCII", "UTF-8", "", NULL, &bytes_written, NULL);
     611        }
     612
     613        if (!translit_name) {
     614                return NULL;
     615        }
     616
    595617        if (bytes_written > MAX_NICK_LENGTH) {
    596618                translit_name[MAX_NICK_LENGTH] = '\0';
Note: See TracChangeset for help on using the changeset viewer.