Changes in irc_send.c [b7fec48:c54bb11]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_send.c
rb7fec48 rc54bb11 41 41 { 42 42 irc_send_num(irc, 1, ":Welcome to the %s gateway, %s", PACKAGE, irc->user->nick); 43 irc_send_num(irc, 2, ":Host %s is running %s %s .", irc->root->host,44 PACKAGE, BITLBEE_VERSION );43 irc_send_num(irc, 2, ":Host %s is running %s %s %s/%s.", irc->root->host, 44 PACKAGE, BITLBEE_VERSION, ARCH, CPU); 45 45 irc_send_num(irc, 3, ":%s", IRCD_INFO); 46 46 irc_send_num(irc, 4, "%s %s %s %s", irc->root->host, BITLBEE_VERSION, UMODES UMODES_PRIV, CMODES); … … 54 54 void irc_send_motd(irc_t *irc) 55 55 { 56 char *motd;57 s ize_t len;58 59 g_file_get_contents(global.conf->motdfile, &motd, &len, NULL); 60 61 if ( !motd || !len) {56 char motd[2048]; 57 ssize_t len; 58 int fd; 59 60 fd = open(global.conf->motdfile, O_RDONLY); 61 if (fd == -1 || (len = read(fd, motd, sizeof(motd) - 1)) <= 0) { 62 62 irc_send_num(irc, 422, ":We don't need MOTDs."); 63 63 } else { … … 66 66 67 67 in = motd; 68 motd[len] = '\0'; 68 69 linebuf[79] = len = 0; 69 70 max = sizeof(linebuf) - 1; … … 100 101 } 101 102 102 g_free(motd); 103 103 if (fd != -1) { 104 close(fd); 105 } 104 106 } 105 107 … … 346 348 } 347 349 348 /* If this is the account nick, check configuration to see if away */ 349 if (iu == irc->user) { 350 /* rfc1459 doesn't mention this: G means gone, H means here */ 351 status_prefix[0] = set_getstr(&irc->b->set, "away") ? 'G' : 'H'; 352 } else { 353 status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H'; 354 } 350 /* rfc1459 doesn't mention this: G means gone, H means here */ 351 status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H'; 355 352 356 353 irc_send_num(irc, 352, "%s %s %s %s %s %s :0 %s",
Note: See TracChangeset
for help on using the changeset viewer.