Changeset 449a51d


Ignore:
Timestamp:
2010-03-16T10:18:02Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ec55a7d
Parents:
9fca0657
Message:

Include non-away status messages in blist and whois responses. The whois
change is a complete violation of the IRC protocol but that doesn't seem
to be an uncommon thing.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • irc_commands.c

    r9fca0657 r449a51d  
    497497                else if( u->away )
    498498                        irc_reply( irc, 301, "%s :%s", u->nick, u->away );
     499                if( u->status_msg )
     500                        irc_reply( irc, 333, "%s :Status: %s", u->nick, u->status_msg );
    499501               
    500502                irc_reply( irc, 318, "%s :End of /WHOIS list", nick );
  • protocols/nogaim.c

    r9fca0657 r449a51d  
    647647        oo = u->online;
    648648       
    649         if( u->away )
    650         {
    651                 g_free( u->away );
    652                 u->away = NULL;
    653         }
     649        g_free( u->away );
     650        g_free( u->status_msg );
     651        u->away = u->status_msg = NULL;
    654652       
    655653        if( ( flags & OPT_LOGGED_IN ) && !u->online )
     
    689687                }
    690688        }
    691         /* else waste_any_state_information_for_now(); */
     689        else
     690        {
     691                u->status_msg = g_strdup( message );
     692        }
    692693       
    693694        /* LISPy... */
  • root_commands.c

    r9fca0657 r449a51d  
    914914                online = 1;
    915915        else
    916                 online =  away = 1;
     916                online = away = 1;
    917917       
    918918        if( strchr( irc->umode, 'b' ) != NULL )
     
    927927                if( online == 1 )
    928928                {
     929                        char st[256] = "Online";
     930                       
     931                        if( u->status_msg )
     932                                g_snprintf( st, sizeof( st ) - 1, "Online (%s)", u->status_msg );
     933                       
    929934                        g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user );
    930                         irc_usermsg( irc, format, u->nick, s, "Online" );
     935                        irc_usermsg( irc, format, u->nick, s, st );
    931936                }
    932937               
  • user.h

    r9fca0657 r449a51d  
    3434       
    3535        char *away;
     36        char *status_msg; /* Non-IRC extension, but nice on IM. */
    3637       
    3738        char is_private;
Note: See TracChangeset for help on using the changeset viewer.