Changeset 975708a
- Timestamp:
- 2010-09-05T12:08:12Z (14 years ago)
- Branches:
- master
- Children:
- 2c6b0f4
- Parents:
- 4e1be76 (diff), ed320e8 (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. - Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r4e1be76 r975708a 136 136 137 137 setsid(); 138 chdir( "/" ); 138 i = chdir( "/" ); 139 /* Don't use i, just make gcc happy. :-/ */ 139 140 140 141 if( getenv( "_BITLBEE_RESTART_STATE" ) == NULL ) -
doc/user-guide/commands.xml
r4e1be76 r975708a 73 73 74 74 <para> 75 By default all your Twitter contacts will come from a contact called twitter_(yourusername). You can change this behaviour using the <emphasis>mode</emphasis> setting (see <emphasis>help set mode</emphasis>).75 By default all your Twitter contacts will appear in a new channel called #twitter_yourusername. You can change this behaviour using the <emphasis>mode</emphasis> setting (see <emphasis>help set mode</emphasis>). 76 76 </para> 77 77 … … 811 811 <bitlbee-setting name="mode" type="string" scope="account"> 812 812 <possible-values>one, many, chat</possible-values> 813 <default>one</default> 814 815 <description> 816 <para> 817 By default, everything from the Twitter module will come from one nick, twitter_(yourusername). If you prefer to have individual nicks for everyone, you can set this setting to "many" instead. 818 </para> 819 820 <para> 821 If you prefer to have all your Twitter things in a separate channel, you can set this setting to "chat". 822 </para> 823 824 <para> 825 In the last two modes, you can send direct messages by /msg'ing your contacts directly. Note, however, that incoming DMs are not fetched yet. 813 <default>chat</default> 814 815 <description> 816 <para> 817 By default, BitlBee will create a separate channel (called #twitter_yourusername) for all your Twitter contacts/messages. 818 </para> 819 820 <para> 821 If you don't want an extra channel, you can set this setting to "one" (everything will come from one nick, twitter_yourusername), or to "many" (individual nicks for everyone). 822 </para> 823 824 <para> 825 With modes "chat" and "many", you can send direct messages by /msg'ing your contacts directly. Note, however, that incoming DMs are not fetched yet. 826 </para> 827 828 <para> 829 With modes "many" and "one", you can post tweets by /msg'ing the twitter_yourusername contact. In mode "chat", messages posted in the Twitter channel will also be posted as tweets. 826 830 </para> 827 831 </description> … … 1461 1465 Only the <emphasis>group list</emphasis> command is supported at the moment, which shows a list of all groups defined so far. 1462 1466 </para> 1467 1468 <para> 1469 If you want to move contacts between groups, you can use the IRC <emphasis>/invite</emphasis> command. Also, if you use the <emphasis>add</emphasis> command in a control channel configured to show just one group, the new contact will automatically be added to that group. 1470 </para> 1463 1471 </description> 1464 1472 </bitlbee-command> -
doc/user-guide/misc.xml
r4e1be76 r975708a 175 175 176 176 <para> 177 If you want to configure your own channels, you can use the <emphasis>channel set</emphasis>. 177 If you want to configure your own channels, you can use the <emphasis>channel set</emphasis> command. See <emphasis>help channels3</emphasis> for more information. 178 </para> 179 180 </sect1> 181 182 <sect1 id="channels3"> 183 <title>Configuring a control channel</title> 184 185 <para> 186 The most important setting for a control channel is <emphasis>fill_by</emphasis>. It 187 tells BitlBee what information should be used to decide if someone should be shown 188 in the channel or not. After setting this setting to, for example, <emphasis>account</emphasis>, you 189 also have to set the <emphasis>account</emphasis> setting. Example: 190 </para> 191 192 <ircexample> 193 <ircline nick="wilmer">chan set &wlm fill_by account</ircline> 194 <ircline nick="root">fill_by = `account'</ircline> 195 <ircline nick="wilmer">chan set &wlm account msn</ircline> 196 <ircline nick="root">account = `msn'</ircline> 197 </ircexample> 198 199 <para> 200 Also, each channel has a <emphasis>show_users</emphasis> setting which lets you 201 choose, for example, if you want to see only online contacts in a channel, or 202 also/just offline contacts. Example: 203 </para> 204 205 <ircexample> 206 <ircline nick="wilmer">chan set &offline show_users offline</ircline> 207 <ircline nick="root">show_users = `offline'</ircline> 208 </ircexample> 209 210 <para> 211 See the help information for all these settings for more information. 178 212 </para> 179 213 -
help.c
r4e1be76 r975708a 157 157 } 158 158 159 lseek( h->fd, h->offset.file_offset, SEEK_SET ); 160 read( h->fd, s, h->length ); 159 if( lseek( h->fd, h->offset.file_offset, SEEK_SET ) == -1 || 160 read( h->fd, s, h->length ) != h->length ) 161 return NULL; 161 162 } 162 163 else -
irc_im.c
r4e1be76 r975708a 252 252 { 253 253 irc_user_t *iu = (irc_user_t *) bu->ui_data; 254 irc_t *irc = (irc_t *) bee->ui_data;255 254 char *s; 256 255 … … 266 265 if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) ) 267 266 { 267 /* People don't like this /NOTICE. Meh, let's go back to the old one. 268 268 char *msg = g_strdup_printf( "<< \002BitlBee\002 - Changed name to `%s' >>", iu->fullname ); 269 269 irc_send_msg( iu, "NOTICE", irc->user->nick, msg, NULL ); 270 */ 271 imcb_log( bu->ic, "User `%s' changed name to `%s'", iu->nick, iu->fullname ); 270 272 } 271 273 … … 691 693 { 692 694 *s = '\0'; 693 if( ( iu = irc_user_by_name( ic->irc, nick ) ) && 695 if( ( iu = irc_user_by_name( ic->irc, nick ) ) && iu->bu && 694 696 iu->bu->nick && irc_channel_has_user( ic, iu ) ) 695 697 { … … 796 798 c->ic->acc->prpl->chat_topic( c, topic ); 797 799 g_free( topic ); 798 return TRUE;799 }800 800 } 801 802 /* Whatever happened, the IM module should ack the topic change. */ 801 803 return FALSE; 802 804 } -
irc_send.c
r4e1be76 r975708a 53 53 void irc_send_motd( irc_t *irc ) 54 54 { 55 char motd[2048]; 56 size_t len; 55 57 int fd; 56 58 57 59 fd = open( global.conf->motdfile, O_RDONLY ); 58 if( fd == -1 )60 if( fd == -1 || ( len = read( fd, motd, sizeof( motd ) - 1 ) ) <= 0 ) 59 61 { 60 62 irc_send_num( irc, 422, ":We don't need MOTDs." ); … … 62 64 else 63 65 { 64 char linebuf[80]; /* Max. line length for MOTD's is 79 chars. It's what most IRC networks seem to do. */ 65 char *add, max; 66 int len; 67 66 char linebuf[80]; 67 char *add = "", max, *in; 68 69 in = motd; 70 motd[len] = '\0'; 68 71 linebuf[79] = len = 0; 69 72 max = sizeof( linebuf ) - 1; 70 73 71 74 irc_send_num( irc, 375, ":- %s Message Of The Day - ", irc->root->host ); 72 while( read( fd, linebuf + len, 1 ) == 1)75 while( ( linebuf[len] = *(in++) ) ) 73 76 { 74 77 if( linebuf[len] == '\n' || len == max ) … … 80 83 else if( linebuf[len] == '%' ) 81 84 { 82 read( fd, linebuf + len, 1);85 linebuf[len] = *(in++); 83 86 if( linebuf[len] == 'h' ) 84 87 add = irc->root->host; … … 87 90 else if( linebuf[len] == 'n' ) 88 91 add = irc->user->nick; 92 else if( linebuf[len] == '\0' ) 93 in --; 89 94 else 90 95 add = "%"; … … 99 104 } 100 105 irc_send_num( irc, 376, ":End of MOTD" ); 106 } 107 108 if( fd != -1 ) 101 109 close( fd ); 102 }103 110 } 104 111 -
motd.txt
r4e1be76 r975708a 17 17 18 18 ... Buzzing, haha, get it? 19 % -
protocols/jabber/conference.c
r4e1be76 r975708a 312 312 char *s; 313 313 314 if( subject && chat ) 315 { 316 s = bud ? strchr( bud->ext_jid, '/' ) : NULL; 317 if( s ) *s = 0; 318 imcb_chat_topic( chat, bud ? bud->ext_jid : NULL, subject->text_len > 0 ? 319 subject->text : NULL, jabber_get_timestamp( node ) ); 320 if( s ) *s = '/'; 321 } 322 314 323 if( bud == NULL || ( jc && ~jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me ) ) 315 324 { … … 366 375 return; 367 376 } 368 369 if( subject )370 {371 s = strchr( bud->ext_jid, '/' );372 if( s ) *s = 0;373 imcb_chat_topic( chat, bud->ext_jid, subject->text_len > 0 ?374 subject->text : NULL, jabber_get_timestamp( node ) );375 if( s ) *s = '/';376 }377 377 if( body && body->text_len > 0 ) 378 378 { -
protocols/jabber/jabber.h
r4e1be76 r975708a 59 59 JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have 60 60 have a real JID. */ 61 JBFLAG_HIDE_SUBJECT = 16, /* Hide the subject field since we probably 62 showed it already. */ 61 63 } jabber_buddy_flags_t; 62 64 -
protocols/jabber/message.c
r4e1be76 r975708a 93 93 } 94 94 } 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 && 96 ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) ) 96 97 { 97 98 g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text ); 99 if( bud ) 100 bud->flags |= JBFLAG_HIDE_SUBJECT; 101 } 102 else if( bud && !c ) 103 { 104 /* Yeah, possibly we're hiding changes to this field now. But nobody uses 105 this for anything useful anyway, except GMail when people reply to an 106 e-mail via chat, repeating the same subject all the time. I don't want 107 to have to remember full subject strings for everyone. */ 108 bud->flags &= ~JBFLAG_HIDE_SUBJECT; 98 109 } 99 110 -
protocols/oscar/oscar.c
r4e1be76 r975708a 517 517 /* Incorrect nick/password */ 518 518 imcb_error(ic, _("Incorrect nickname or password.")); 519 { 520 int max = od->icq ? 8 : 16; 521 if (strlen(ic->acc->pass) > max) 522 imcb_log(ic, "Note that the maximum password " 523 "length supported by this protocol is " 524 "%d characters, try logging in using " 525 "a shorter password.", max); 526 } 519 527 // plugin_event(event_error, (void *)980, 0, 0, 0); 520 528 break; -
protocols/oscar/ssi.c
r4e1be76 r975708a 415 415 if (!parentgroup) { 416 416 char *newgroup; 417 newgroup = (char*)g_malloc(strlen("Unknown") *sizeof(char));417 newgroup = (char*)g_malloc(strlen("Unknown")+1); 418 418 strcpy(newgroup, "Unknown"); 419 419 aim_ssi_addgroups(sess, conn, &newgroup, 1); -
protocols/twitter/twitter.c
r4e1be76 r975708a 195 195 s = set_add( &acc->set, "message_length", "140", set_eval_int, acc ); 196 196 197 s = set_add( &acc->set, "mode", " one", set_eval_mode, acc );197 s = set_add( &acc->set, "mode", "chat", set_eval_mode, acc ); 198 198 s->flags |= ACC_SET_OFFLINE_ONLY; 199 199 -
unix.c
r4e1be76 r975708a 167 167 doesn't make a copy. Odd. */ 168 168 169 chdir( old_cwd );169 i = chdir( old_cwd ); 170 170 close( global.listen_socket ); 171 171
Note: See TracChangeset
for help on using the changeset viewer.