Changeset a9b1e0e


Ignore:
Timestamp:
2015-04-06T17:01:55Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
0fb32dd, 693aca0
Parents:
8bcd160
Message:

irc_channel: use irc_t instead of bee_t

Fixes the test suite. I guess it's useful for something.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • irc.h

    r8bcd160 ra9b1e0e  
    299299void irc_channel_name_strip(char *name);
    300300int irc_channel_name_cmp(const char *a_, const char *b_);
    301 char *irc_channel_name_gen(bee_t *bee, const char *name);
     301char *irc_channel_name_gen(irc_t *irc, const char *name);
    302302gboolean irc_channel_name_hint(irc_channel_t *ic, const char *name);
    303303void irc_channel_update_ops(irc_channel_t *ic, char *value);
  • irc_channel.c

    r8bcd160 ra9b1e0e  
    556556}
    557557
    558 gboolean irc_channel_is_unused(bee_t *bee, char *name)
     558gboolean irc_channel_is_unused(irc_t *irc, char *name)
    559559{
    560560        char *type, *chat_type;
     
    565565        }
    566566
    567         if (!(oic = irc_channel_by_name(bee->ui_data, name))) {
     567        if (!(oic = irc_channel_by_name(irc, name))) {
    568568                return TRUE;
    569569        }
     
    586586}
    587587
    588 char *irc_channel_name_gen(bee_t *bee, const char *hint)
     588char *irc_channel_name_gen(irc_t *irc, const char *hint)
    589589{
    590590        char name[MAX_NICK_LENGTH + 1] = { 0 };
     
    605605        irc_channel_name_strip(name);
    606606
    607         if (set_getbool(&bee->set, "lcnicks")) {
    608                 nick_lc(bee->ui_data, name + 1);
    609         }
    610 
    611         while (!irc_channel_is_unused(bee, name)) {
     607        if (set_getbool(&irc->b->set, "lcnicks")) {
     608                nick_lc(irc, name + 1);
     609        }
     610
     611        while (!irc_channel_is_unused(irc, name)) {
    612612                underscore_dedupe(name);
    613613        }
     
    626626        }
    627627
    628         if (!(full_name = irc_channel_name_gen(irc->b, name))) {
     628        if (!(full_name = irc_channel_name_gen(irc, name))) {
    629629                return FALSE;
    630630        }
Note: See TracChangeset for help on using the changeset viewer.