[X2serv-cvs] [CVS] Module x3: Change committed
Brought to you by:
sirvulcan
From: Alex S. <ru...@us...> - 2005-03-20 01:11:59
|
Committer : Alex Schumann <ru...@us...> CVSROOT : /cvsroot/x2serv Module : x3 Commit time: 2005-03-20 01:11:45 UTC Modified files: ChangeLog.X3 src/chanserv.c src/chanserv.h src/chanserv.help src/helpfile.c src/main.c src/nickserv.c src/opserv.c src/opserv.help src/sendmail.c src/tools.c Log message: Lots of style changes to user replies. added numeric access back ---------------------- diff included ---------------------- Index: x3/ChangeLog.X3 diff -u x3/ChangeLog.X3:1.12 x3/ChangeLog.X3:1.13 --- x3/ChangeLog.X3:1.12 Fri Mar 18 00:04:57 2005 +++ x3/ChangeLog.X3 Sat Mar 19 17:11:34 2005 @@ -1,6 +1,19 @@ /*********************************************************************** X3 ChangeLog +2005-03-19 Alex Schumann <ru...@af...> + + * chanserv.c: Changed style of command outputs, added userlevel back + to users list. + + * opserv.c: Changed style of command outputs + + * tools.c: shortened duration string lengths + + * main.c: shortened duration string lengths + + * sendmail.c: Changed style of stats email + 2005-03-18 Alex Schumann <ru...@af...> * Changed breef to brief... @@ -62,5 +75,5 @@ ***********************************************************************/ -#define CVS_VERSION "$Revision: 1.12 $" +#define CVS_VERSION "$Revision: 1.13 $" Index: x3/src/chanserv.c diff -u x3/src/chanserv.c:1.19 x3/src/chanserv.c:1.20 --- x3/src/chanserv.c:1.19 Fri Mar 18 00:04:58 2005 +++ x3/src/chanserv.c Sat Mar 19 17:11:34 2005 @@ -131,9 +131,9 @@ /* Do-not-register channels */ { "CSMSG_NOT_DNR", "$b%s$b is not a valid channel name or *account." }, - { "CSMSG_DNR_SEARCH_RESULTS", "The following do-not-registers were found:" }, - { "CSMSG_DNR_INFO", "$b%s$b is do-not-register (by $b%s$b): %s" }, - { "CSMSG_DNR_INFO_SET", "$b%s$b is do-not-register (set %s by $b%s$b): %s" }, + { "CSMSG_DNR_SEARCH_RESULTS", "$bDo-Not-Register Channels$b" }, + { "CSMSG_DNR_INFO", "$b%s$b (set by $b%s$b): %s" }, + { "CSMSG_DNR_INFO_SET", "$b%s$b (set %s ago by $b%s$b): %s" }, { "CSMSG_MORE_DNRS", "%d more do-not-register entries skipped." }, { "CSMSG_DNR_CHANNEL", "Only network staff may register $b%s$b." }, { "CSMSG_DNR_CHANNEL_MOVE", "Only network staff may move $b%s$b." }, @@ -184,7 +184,7 @@ { "CSMSG_DELETED_YOU", "Your $b%d$b access has been deleted from $b%s$b." }, /* User management */ - { "CSMSG_ADDED_USER", "Added %s to the %s user list with access %d." }, + { "CSMSG_ADDED_USER", "Added %s to the %s user list with access %s (%d)." }, { "CSMSG_DELETED_USER", "Deleted %s (with access %d) from the %s user list." }, { "CSMSG_BAD_RANGE", "Invalid access range; minimum (%d) must be greater than maximum (%d)." }, { "CSMSG_DELETED_USERS", "Deleted accounts matching $b%s$b with access from $b%d$b to $b%d$b from the %s user list." }, @@ -319,10 +319,11 @@ { "CSMSG_BANS_REMOVED", "Removed all channel bans from $b%s$b." }, /* Channel userlist */ - { "CSMSG_ACCESS_ALL_HEADER", "%s users from level %s to %s" }, - { "CSMSG_ACCESS_SEARCH_HEADER", "%s users from level %s to %s matching %s" }, + { "CSMSG_ACCESS_ALL_HEADER", "$b%s Users From Level %s To %s$b" }, + { "CSMSG_ACCESS_SEARCH_HEADER", "$b%s Users From Level %s To %s Matching %s$b" }, { "CSMSG_INVALID_ACCESS", "$b%s$b is an invalid access level." }, - { "CSMSG_CHANGED_ACCESS", "%s now has access $b%s$b in %s." }, + { "CSMSG_CHANGED_ACCESS", "%s now has access $b%s$b (%u) in %s." }, + { "CSMSG_BANS_HEADER", "$bBans in %s$b" }, /* Channel note list */ { "CSMSG_NOTELIST_HEADER", "Notes for $b%s$b:" }, @@ -356,9 +357,9 @@ { "CSMSG_SQUAT_ACCESS", "$b%s$b does not have access to any channels." }, { "CSMSG_INFOLINE_LIST", "Showing all channel entries for account $b%s$b:" }, { "CSMSG_USER_NO_ACCESS", "%s lacks access to %s." }, - { "CSMSG_USER_HAS_ACCESS", "%s has $b%s$b access in %s." }, + { "CSMSG_USER_HAS_ACCESS", "%s has $b%s$b access (%d) in %s." }, { "CSMSG_HELPER_NO_ACCESS", "%s lacks access to %s but has $bsecurity override$b enabled." }, - { "CSMSG_HELPER_HAS_ACCESS", "%s has $b%s$b access in %s and has $bsecurity override$b enabled." }, + { "CSMSG_HELPER_HAS_ACCESS", "%s has $b%s$b access (%d) in %s and has $bsecurity override$b enabled." }, { "CSMSG_LAZY_SMURF_TARGET", "%s is %s ($bIRCOp$b; not logged in)." }, { "CSMSG_SMURF_TARGET", "%s is %s ($b%s$b)." }, { "CSMSG_LAME_SMURF_TARGET", "%s is an IRC operator." }, @@ -374,7 +375,8 @@ { "CSMSG_END_NAMES", "End of names in $b%s$b" }, /* Channel information */ - { "CSMSG_CHANNEL_INFO", "$b%s$b Information:" }, + { "CSMSG_CHANNEL_INFO", "$bInformation About %s$b" }, + { "CSMSG_BAR", "----------------------------------------"}, { "CSMSG_CHANNEL_TOPIC", "$bDefault Topic: $b%s" }, { "CSMSG_CHANNEL_MODES", "$bMode Lock: $b%s" }, { "CSMSG_CHANNEL_NOTE", "$b%s:%*s$b%s" }, @@ -395,13 +397,15 @@ { "CSMSG_CHANNEL_SUSPENDED_7", " %s ago by %s; revoked %s ago: %s" }, { "CSMSG_CHANNEL_REGISTERED", "$bRegistered: $b%s ago." }, { "CSMSG_CHANNEL_VISITED", "$bVisited: $b%s ago." }, + { "CSMSG_CHANNEL_END", "---------------End of Info--------------"}, - { "CSMSG_PEEK_INFO", "$b%s$b Status:" }, + { "CSMSG_PEEK_INFO", "$bStatus of %s$b" }, { "CSMSG_PEEK_TOPIC", "$bTopic: $b%s" }, { "CSMSG_PEEK_MODES", "$bModes: $b%s" }, { "CSMSG_PEEK_USERS", "$bTotal users: $b%d" }, { "CSMSG_PEEK_OPS", "$bOps:$b" }, { "CSMSG_PEEK_NO_OPS", "$bOps: $bNone present" }, + { "CSMSG_PEEK_END", "-------------End of Status--------------" }, /* Network information */ { "CSMSG_NETWORK_INFO", "Network Information:" }, @@ -423,11 +427,12 @@ { "CSMSG_ACTION_INVALID", "$b%s$b is not a recognized search action." }, { "CSMSG_UNVISITED_HEADER", "Showing a maximum of %d channels unvisited for $b%s$b:" }, { "CSMSG_UNVISITED_DATA", "%s: $b%s$b" }, - { "CSMSG_CHANNEL_SEARCH_RESULTS", "The following channels were found:" }, + { "CSMSG_CHANNEL_SEARCH_RESULTS", "$bChannels Found Matching Search$b" }, /* Channel configuration */ { "CSMSG_INVALID_OPTION", "$b%s$b is not a valid %s option." }, - { "CSMSG_CHANNEL_OPTIONS", "Channel Options:" }, + { "CSMSG_CHANNEL_OPTIONS", "$bChannel Options for %s$b" }, + { "CSMSG_CHANNEL_OPTIONS_END", "-------------End of Options-------------" }, { "CSMSG_GREETING_TOO_LONG", "Your greeting ($b%d$b characters) must be shorter than $b%d$b characters." }, /* User settings */ @@ -447,7 +452,7 @@ { "CSMSG_HUGGLES_YOU", "\001ACTION huggles you\001" }, /* Other things */ - { "CSMSG_EVENT_SEARCH_RESULTS", "The following channel events were found:" }, + { "CSMSG_EVENT_SEARCH_RESULTS", "$bChannel Events for %s$b" }, { NULL, NULL } }; @@ -1616,6 +1621,7 @@ dict_iterator_t it; reply("CSMSG_DNR_SEARCH_RESULTS"); + reply("CSMSG_BAR"); matches = 0; for(it = dict_first(handle_dnrs); it; it = iter_next(it)) { @@ -1674,6 +1680,7 @@ } reply("CSMSG_DNR_SEARCH_RESULTS"); + reply("CSMSG_BAR"); if(*target == '*') matches = chanserv_show_dnrs(user, cmd, NULL, target + 1); else @@ -2301,7 +2308,7 @@ actee = add_channel_user(channel->channel_info, handle, access, 0, NULL); scan_user_presence(actee, NULL); - reply("CSMSG_ADDED_USER", handle->handle, channel->name, access); + reply("CSMSG_ADDED_USER", handle->handle, channel->name, user_level_name_from_level(access), access); return 1; } @@ -2353,7 +2360,7 @@ } victim->access = new_access; - reply("CSMSG_CHANGED_ACCESS", handle->handle, user_level_name_from_level(new_access), channel->name); + reply("CSMSG_CHANGED_ACCESS", handle->handle, user_level_name_from_level(new_access), new_access, channel->name); return 1; } @@ -3452,7 +3459,7 @@ && ((target_handle->opserv_level >= chanserv_conf.nodelete_level) || !IsProtected(channel->channel_info)); if((uData = GetTrueChannelAccess(channel->channel_info, target_handle))) { - reply((helping ? "CSMSG_HELPER_HAS_ACCESS" : "CSMSG_USER_HAS_ACCESS"), prefix, user_level_name_from_level(uData->access), channel->name); + reply((helping ? "CSMSG_HELPER_HAS_ACCESS" : "CSMSG_USER_HAS_ACCESS"), prefix, user_level_name_from_level(uData->access), uData->access, channel->name); /* To prevent possible information leaks, only show infolines * if the requestor is in the channel or it's their own * handle. */ @@ -3600,15 +3607,16 @@ qsort(lData.users, matches, sizeof(lData.users[0]), userData_access_comp); lData.table.length = matches+1; - lData.table.width = 4; + lData.table.width = 5; lData.table.flags = TABLE_NO_FREE; lData.table.contents = malloc(lData.table.length*sizeof(*lData.table.contents)); ary = malloc(lData.table.width*sizeof(**lData.table.contents)); lData.table.contents[0] = ary; ary[0] = "Access"; - ary[1] = "Account"; - ary[2] = "Last Seen"; - ary[3] = "Status"; + ary[1] = "Level"; + ary[2] = "Account"; + ary[3] = "Last Seen"; + ary[4] = "Status"; for(matches = 1; matches < lData.table.length; ++matches) { struct userData *uData = lData.users[matches-1]; @@ -3620,25 +3628,26 @@ ary[0] = user_level_name_from_level(uData->access); /* TODO: replace above with func that returns static string * of userlevel for that level. eg OP/MANAGER etc. -rubin */ - ary[1] = uData->handle->handle; + ary[1] = strtab(uData->access); + ary[2] = uData->handle->handle; if(uData->present) - ary[2] = "Here"; + ary[3] = "Here"; else if(!uData->seen) - ary[2] = "Never"; + ary[3] = "Never"; else - ary[2] = intervalString(seen, now - uData->seen, user->handle_info); - ary[2] = strdup(ary[2]); + ary[3] = intervalString(seen, now - uData->seen, user->handle_info); + ary[3] = strdup(ary[3]); if(IsUserSuspended(uData)) - ary[3] = "Suspended"; + ary[4] = "Suspended"; else if(HANDLE_FLAGGED(uData->handle, FROZEN)) - ary[3] = "Vacation"; + ary[4] = "Vacation"; else - ary[3] = "Normal"; + ary[4] = "Normal"; } send_list(&lData); for(matches = 1; matches < lData.table.length; ++matches) { - free((char*)lData.table.contents[matches][2]); + free((char*)lData.table.contents[matches][3]); free(lData.table.contents[matches]); } free(lData.table.contents[0]); @@ -3694,6 +3703,7 @@ else search = NULL; + reply("CSMSG_BANS_HEADER", channel->name); bans = alloca(channel->channel_info->banCount * sizeof(struct banData *)); for(ban = channel->channel_info->bans; ban; ban = ban->next) @@ -3760,7 +3770,7 @@ tbl.contents[ii][3] = ban->reason; } table_send(cmd->parent->bot, user->nick, 0, NULL, tbl); - reply("MSG_MATCH_COUNT", matches); + /* reply("MSG_MATCH_COUNT", matches); */ for(ii = 1; ii < tbl.length; ++ii) { free((char*)tbl.contents[ii][2]); @@ -4025,6 +4035,7 @@ cData = channel->channel_info; reply("CSMSG_CHANNEL_INFO", channel->name); + reply("CSMSG_BAR"); uData = GetChannelUser(cData, user->handle_info); if(uData && (uData->access >= cData->lvlOpts[lvlGiveOps])) @@ -4074,6 +4085,7 @@ reply("CSMSG_CHANNEL_SUSPENDED", channel->name); show_suspension_info(cmd, user, cData->suspended); } + reply("CSMSG_CHANNEL_END"); return 1; } @@ -4160,6 +4172,7 @@ irc_make_chanmode(channel, modes); reply("CSMSG_PEEK_INFO", channel->name); + reply("CSMSG_BAR"); reply("CSMSG_PEEK_TOPIC", channel->topic); reply("CSMSG_PEEK_MODES", modes); reply("CSMSG_PEEK_USERS", channel->members.used); @@ -4184,6 +4197,7 @@ } else reply("CSMSG_PEEK_NO_OPS"); + reply("CSMSG_PEEK_END"); return 1; } @@ -4516,7 +4530,8 @@ discrim.severities = 1 << LOG_COMMAND; report.reporter = chanserv; report.user = user; - reply("CSMSG_EVENT_SEARCH_RESULTS"); + reply("CSMSG_EVENT_SEARCH_RESULTS", channel->name); + reply("CSMSG_BAR"); matches = log_entry_search(&discrim, log_report_entry, &report); if(matches) reply("MSG_MATCH_COUNT", matches); @@ -4851,7 +4866,10 @@ search->limit = INT_MAX; if(action == search_print) + { reply("CSMSG_CHANNEL_SEARCH_RESULTS"); + reply("CSMSG_BAR"); + } matches = chanserv_channel_search(search, action, user); @@ -5420,12 +5438,14 @@ if(argc < 2) { - reply("CSMSG_CHANNEL_OPTIONS"); + reply("CSMSG_CHANNEL_OPTIONS", channel->name); + reply("CSMSG_BAR"); for(ii = 0; ii < set_shows_list.used; ii++) { subcmd = set_shows_list.list[ii]; subcmd->command->func(user, channel, 1, argv+1, subcmd); } + reply("CSMSG_CHANNEL_OPTIONS_END"); return 1; } Index: x3/src/chanserv.h diff -u x3/src/chanserv.h:1.7 x3/src/chanserv.h:1.8 --- x3/src/chanserv.h:1.7 Sat Mar 12 12:13:14 2005 +++ x3/src/chanserv.h Sat Mar 19 17:11:35 2005 @@ -181,5 +181,7 @@ int check_user_level(struct chanNode *channel, struct userNode *user, enum levelOption opt, int allow_override, int exempt_owner); void do_math(char *Buffer, char *Math); +char* user_level_name_from_level(int level); + #endif Index: x3/src/chanserv.help diff -u x3/src/chanserv.help:1.7 x3/src/chanserv.help:1.8 --- x3/src/chanserv.help:1.7 Sun Mar 6 19:51:24 2005 +++ x3/src/chanserv.help Sat Mar 19 17:11:35 2005 @@ -205,8 +205,8 @@ "$uFor assistance, please join #Help$u", "Example: *!*serv@*.afternet.org would ban anyone with ident 'serv' and an afternet.org hostname from joining the channel.", "$uSee Also:$u unban, unbanall, unbanme"); -"BANS" ("/msg $C BANS <#channel>", - "This command lists all permanent and timed bans in the channel.", +"BANS" ("/msg $C BANS <#channel> [mask]", + "This command lists all permanent and timed bans in the channel matching mask.", "$uSee Also:$u addban, delban, mdelban"); "CALC" ("/msg $C CALC <expression>", "CALC calculates a mathematical expression, and returns the answer. It", Index: x3/src/helpfile.c diff -u x3/src/helpfile.c:1.6 x3/src/helpfile.c:1.7 --- x3/src/helpfile.c:1.6 Thu Mar 17 22:19:43 2005 +++ x3/src/helpfile.c Sat Mar 19 17:11:35 2005 @@ -345,14 +345,14 @@ for (pos=ii=0; ii<((table.flags & TABLE_REPEAT_HEADERS)?nreps:1); ii++) { for (jj=0; 1; ) { len = strlen(table.contents[0][jj]); - line[pos++] = '\02'; /* bold header */ + //line[pos++] = '\02'; /* bold header */ spaces = max_width[jj] - len; if (table.flags & TABLE_PAD_LEFT) while (spaces--) line[pos++] = ' '; memcpy(line+pos, table.contents[0][jj], len); pos += len; - line[pos++] = '\02'; /* end bold header */ + //line[pos++] = '\02'; /* end bold header */ if (++jj == table.width) break; if (!(table.flags & TABLE_PAD_LEFT)) @@ -362,12 +362,13 @@ } } line[pos] = 0; - irc_send(from, to, line); sepsize = strlen_vis(line); sepstr = malloc(sepsize + 1); memset(sepstr, '-', sepsize); sepstr[sepsize] = 0; - irc_send(from, to, sepstr); + irc_send(from, to, sepstr); /* ----------------- */ + irc_send(from, to, line); /* alpha beta roe */ + irc_send(from, to, sepstr); /* ----------------- */ ii = 1; } /* Send the table. */ Index: x3/src/main.c diff -u x3/src/main.c:1.5 x3/src/main.c:1.6 --- x3/src/main.c:1.5 Tue Mar 15 21:16:51 2005 +++ x3/src/main.c Sat Mar 19 17:11:35 2005 @@ -77,6 +77,7 @@ { "MSG_ON", "On" }, { "MSG_OFF", "Off" }, { "MSG_NEVER", "Never" }, + { "MSG_BAR", "----------------------------------------" }, { "MSG_SERVICE_IMMUNE", "$b%s$b may not be kicked, killed, banned, or deopped." }, { "MSG_SERVICE_PRIVILEGED", "$b%s$b is a privileged service." }, { "MSG_NOT_A_SERVICE", "$b%s$b is not a service bot." }, @@ -107,7 +108,7 @@ { "MSG_STUPID_ACCESS_CHANGE", "Please ask someone $belse$b to demote you." }, { "MSG_NO_SEARCH_ACCESS", "You do not have enough access to search based on $b%s$b." }, { "MSG_INVALID_CRITERIA", "$b%s$b is an invalid search criteria." }, - { "MSG_MATCH_COUNT", "Found $b%u$b matches." }, + { "MSG_MATCH_COUNT", "-----------Found $b%3u$b Matches------------" }, { "MSG_NO_MATCHES", "Nothing matched the criteria of your search." }, { "MSG_TOPIC_UNKNOWN", "No help on that topic." }, { "MSG_INVALID_BINARY", "$b%s$b is an invalid binary value." }, @@ -117,20 +118,20 @@ { "MSG_DB_WRITE_ERROR", "Error while writing database %s." }, { "MSG_DB_WROTE_DB", "Wrote database %s (in "FMT_TIME_T".%06lu seconds)." }, { "MSG_DB_WROTE_ALL", "Wrote all databases (in "FMT_TIME_T".%06lu seconds)." }, - { "MSG_AND", "and" }, + { "MSG_AND", "," }, { "MSG_0_SECONDS", "0 seconds" }, - { "MSG_YEAR", "year" }, - { "MSG_YEARS", "years" }, - { "MSG_WEEK", "week" }, - { "MSG_WEEKS", "weeks" }, - { "MSG_DAY", "day" }, - { "MSG_DAYS", "days" }, - { "MSG_HOUR", "hour" }, - { "MSG_HOURS", "hours" }, - { "MSG_MINUTE", "minute" }, - { "MSG_MINUTES", "minutes" }, - { "MSG_SECOND", "second" }, - { "MSG_SECONDS", "seconds" }, + { "MSG_YEAR", "y" }, + { "MSG_YEARS", "y" }, + { "MSG_WEEK", "w" }, + { "MSG_WEEKS", "w" }, + { "MSG_DAY", "d" }, + { "MSG_DAYS", "d" }, + { "MSG_HOUR", "h" }, + { "MSG_HOURS", "h" }, + { "MSG_MINUTE", "m" }, + { "MSG_MINUTES", "m" }, + { "MSG_SECOND", "s" }, + { "MSG_SECONDS", "s" }, { NULL, NULL } }; Index: x3/src/nickserv.c diff -u x3/src/nickserv.c:1.19 x3/src/nickserv.c:1.20 --- x3/src/nickserv.c:1.19 Sat Mar 12 13:10:47 2005 +++ x3/src/nickserv.c Sat Mar 19 17:11:35 2005 @@ -185,29 +185,30 @@ { "NSMSG_TITLE_INVALID", "Titles cannot contain any dots; please choose another." }, { "NSMSG_TITLE_TRUNCATED", "That title combined with the user's account name would result in a truncated host; please choose a shorter title." }, { "NSMSG_FAKEHOST_INVALID", "Fake hosts must be shorter than %d characters and cannot start with a dot." }, - { "NSMSG_HANDLEINFO_ON", "Account information for $b%s$b:" }, - { "NSMSG_HANDLEINFO_ID", " Account ID: %lu" }, - { "NSMSG_HANDLEINFO_REGGED", " Registered on: %s" }, - { "NSMSG_HANDLEINFO_LASTSEEN", " Last seen: %s" }, - { "NSMSG_HANDLEINFO_LASTSEEN_NOW", " Last seen: Right now!" }, - { "NSMSG_HANDLEINFO_VACATION", " On vacation." }, - { "NSMSG_HANDLEINFO_EMAIL_ADDR", " Email address: %s" }, - { "NSMSG_HANDLEINFO_COOKIE_ACTIVATION", " Cookie: There is currently an activation cookie issued for this account" }, - { "NSMSG_HANDLEINFO_COOKIE_PASSWORD", " Cookie: There is currently a password change cookie issued for this account" }, - { "NSMSG_HANDLEINFO_COOKIE_EMAIL", " Cookie: There is currently an email change cookie issued for this account" }, - { "NSMSG_HANDLEINFO_COOKIE_ALLOWAUTH", " Cookie: There is currently an allowauth cookie issued for this account" }, - { "NSMSG_HANDLEINFO_COOKIE_UNKNOWN", " Cookie: There is currently an unknown cookie issued for this account" }, - { "NSMSG_HANDLEINFO_INFOLINE", " Infoline: %s" }, - { "NSMSG_HANDLEINFO_FLAGS", " Flags: %s" }, - { "NSMSG_HANDLEINFO_EPITHET", " Epithet: %s" }, - { "NSMSG_HANDLEINFO_FAKEHOST", " Fake host: %s" }, - { "NSMSG_HANDLEINFO_LAST_HOST", " Last quit hostmask: %s" }, - { "NSMSG_HANDLEINFO_LAST_HOST_UNKNOWN", " Last quit hostmask: Unknown" }, - { "NSMSG_HANDLEINFO_NICKS", " Nickname(s): %s" }, - { "NSMSG_HANDLEINFO_MASKS", " Hostmask(s): %s" }, - { "NSMSG_HANDLEINFO_CHANNELS", " Channel(s): %s" }, - { "NSMSG_HANDLEINFO_CURRENT", " Current nickname(s): %s" }, - { "NSMSG_HANDLEINFO_DNR", " Do-not-register (by %s): %s" }, + { "NSMSG_HANDLEINFO_ON", "$bAccount Information for %s$b" }, + { "NSMSG_HANDLEINFO_END", "----------End of Account Info-----------" }, + { "NSMSG_HANDLEINFO_ID", "Account ID: %lu" }, + { "NSMSG_HANDLEINFO_REGGED", "Registered on: %s" }, + { "NSMSG_HANDLEINFO_LASTSEEN", "Last seen: %s" }, + { "NSMSG_HANDLEINFO_LASTSEEN_NOW", "Last seen: Right now!" }, + { "NSMSG_HANDLEINFO_VACATION", "On vacation." }, + { "NSMSG_HANDLEINFO_EMAIL_ADDR", "Email address: %s" }, + { "NSMSG_HANDLEINFO_COOKIE_ACTIVATION", "Cookie: There is currently an activation cookie issued for this account" }, + { "NSMSG_HANDLEINFO_COOKIE_PASSWORD", "Cookie: There is currently a password change cookie issued for this account" }, + { "NSMSG_HANDLEINFO_COOKIE_EMAIL", "Cookie: There is currently an email change cookie issued for this account" }, + { "NSMSG_HANDLEINFO_COOKIE_ALLOWAUTH", "Cookie: There is currently an allowauth cookie issued for this account" }, + { "NSMSG_HANDLEINFO_COOKIE_UNKNOWN", "Cookie: There is currently an unknown cookie issued for this account" }, + { "NSMSG_HANDLEINFO_INFOLINE", "Infoline: %s" }, + { "NSMSG_HANDLEINFO_FLAGS", "Flags: %s" }, + { "NSMSG_HANDLEINFO_EPITHET", "Epithet: %s" }, + { "NSMSG_HANDLEINFO_FAKEHOST", "Fake host: %s" }, + { "NSMSG_HANDLEINFO_LAST_HOST", "Last quit hostmask: %s" }, + { "NSMSG_HANDLEINFO_LAST_HOST_UNKNOWN", "Last quit hostmask: Unknown" }, + { "NSMSG_HANDLEINFO_NICKS", "Nickname(s): %s" }, + { "NSMSG_HANDLEINFO_MASKS", "Hostmask(s): %s" }, + { "NSMSG_HANDLEINFO_CHANNELS", "Channel(s): %s" }, + { "NSMSG_HANDLEINFO_CURRENT", "Current nickname(s): %s" }, + { "NSMSG_HANDLEINFO_DNR", "Do-not-register (by %s): %s" }, { "NSMSG_USERINFO_AUTHED_AS", "$b%s$b is authenticated to account $b%s$b." }, { "NSMSG_USERINFO_NOT_AUTHED", "$b%s$b is not authenticated to any account." }, { "NSMSG_NICKINFO_OWNER", "Nick $b%s$b is owned by account $b%s$b." }, @@ -1384,6 +1385,7 @@ nsmsg_none = handle_find_message(hi, "MSG_NONE"); reply("NSMSG_HANDLEINFO_ON", hi->handle); + reply("MSG_BAR"); #ifdef WITH_PROTOCOL_BAHAMUT reply("NSMSG_HANDLEINFO_ID", hi->id); #endif @@ -1510,7 +1512,7 @@ } if (IsUserSuspended(channel)) buff[pos++] = '-'; - pos += sprintf(buff+pos, "%d:%s ", channel->access, name); + pos += sprintf(buff+pos, "%s:%s ", user_level_name_from_level(channel->access), name); if (next == NULL) { print_chans_buff: buff[pos-1] = 0; @@ -1540,6 +1542,7 @@ } } + reply("NSMSG_HANDLEINFO_END"); return 1; } Index: x3/src/opserv.c diff -u x3/src/opserv.c:1.14 x3/src/opserv.c:1.15 --- x3/src/opserv.c:1.14 Thu Mar 17 12:18:29 2005 +++ x3/src/opserv.c Sat Mar 19 17:11:35 2005 @@ -86,6 +86,7 @@ #define OSMSG_GAG_REQUESTED "Gag requested by %s." static const struct message_entry msgtab[] = { + { "OSMSG_BAR", "----------------------------------------" }, { "OSMSG_USER_ACCESS_IS", "$b%s$b (account $b%s$b) has %d access." }, { "OSMSG_LEVEL_TOO_LOW", "You lack sufficient access to use this command." }, { "OSMSG_NEED_CHANNEL", "You must specify a channel for $b%s$b." }, @@ -159,8 +160,12 @@ { "OSMSG_MAX_CLIENTS", "Max clients: %d at %s" }, { "OSMSG_NETWORK_INFO", "Total users: %d (%d invisible, %d opers)" }, { "OSMSG_RESERVED_LIST", "List of reserved nicks:" }, - { "OSMSG_TRUSTED_LIST", "List of trusted hosts:" }, - { "OSMSG_HOST_IS_TRUSTED", "%s (%s; set %s ago by %s; expires %s: %s)" }, + { "OSMSG_TRUSTED_LIST", "$bTrusted Hosts$b" }, + { "OSMSG_TRUSTED_LIST_HEADER", "IP Address Limit By Time" }, + { "OSMSG_HOST_IS_TRUSTED", "%-15s %-5s %-10s set %s ago, expires %s" }, + { "OSMSG_HOST_IS_TRUSTED_DESC", " Reason: %s" }, + { "OSMSG_TRUSTED_LIST_BAR", "----------------------------------------" }, + { "OSMSG_TRUSTED_LIST_END", "----------End of Trusted Hosts----------" }, { "OSMSG_HOST_NOT_TRUSTED", "%s does not have a special trust." }, { "OSMSG_UPTIME_STATS", "Uptime: %s (%u lines processed, CPU time %.2fu/%.2fs)" }, { "OSMSG_LINE_DUMPED", "Raw line sent." }, @@ -196,6 +201,9 @@ { "OSMSG_SETTIME_SUCCESS", "Set time for servers named like $b%s$b." }, { "OSMSG_BAD_ACTION", "Unrecognized trace action $b%s$b." }, { "OSMSG_USER_SEARCH_RESULTS", "The following users were found:" }, + { "OSMSG_USER_SEARCH_HEADER", "Nick User@Host (Account)" }, + { "OSMSG_USER_SEARCH_BAR", "-------------------------------------------" }, + { "OSMSG_USER_SEARCH_COUNT", "------------ Found %4u matches -----------" }, { "OSMSG_CHANNEL_SEARCH_RESULTS", "The following channels were found:" }, { "OSMSG_GLINE_SEARCH_RESULTS", "The following glines were found:" }, { "OSMSG_LOG_SEARCH_RESULTS", "The following log entries were found:" }, @@ -214,8 +222,12 @@ { "OSMSG_ADDED_ALERT", "Added alert named $b%s$b." }, { "OSMSG_REMOVED_ALERT", "Removed alert named $b%s$b." }, { "OSMSG_NO_SUCH_ALERT", "No alert named $b%s$b could be found." }, - { "OSMSG_ALERT_IS", "%s (by %s, reaction %s): %s" }, - { "OSMSG_ALERTS_LIST", "Current $O alerts:" }, + { "OSMSG_ALERTS_LIST", "$bCurrent $O alerts$b" }, + { "OSMSG_ALERTS_BAR", "----------------------------------------------" }, + { "OSMSG_ALERTS_HEADER", "Name Action (by Oper)" }, + { "OSMSG_ALERTS_DESC", " Criteria: %s" }, + { "OSMSG_ALERT_IS", "$b%-20s$b %-6s (by %s)" }, + { "OSMSG_ALERT_END", "----------------End of Alerts-----------------" }, { "OSMSG_REHASH_COMPLETE", "Completed rehash of configuration database." }, { "OSMSG_REHASH_FAILED", "Rehash of configuration database failed, previous configuration is intact." }, { "OSMSG_REOPEN_COMPLETE", "Closed and reopened all log files." }, @@ -263,7 +275,7 @@ struct userNode *opserv; -static dict_t opserv_chan_warn; /* data is char* */ +/*static dict_t opserv_chan_warn; */ /* data is char* */ static dict_t opserv_reserved_nick_dict; /* data is struct userNode* */ static struct string_list *opserv_bad_words; static dict_t opserv_exempt_channels; /* data is not used */ @@ -495,6 +507,8 @@ return 1; } +/* This command has been replaced by 'alert notice channel #foo' */ +/* static MODCMD_FUNC(cmd_warn) { char *reason, *message; @@ -535,6 +549,7 @@ reply("OSMSG_WARN_DELETED", argv[1]); return 1; } +*/ static MODCMD_FUNC(cmd_clearbans) { @@ -1393,8 +1408,10 @@ char buffer[400]; /* Show the bad word list.. */ + /* TODO: convert nonprinting chars like bold to $b etc in a usable way */ for (ii=end=0; ii<opserv_bad_words->used; ii++) { here_len = strlen(opserv_bad_words->list[ii]); + /* If the line is full output it & start again */ if ((end + here_len + 2) > sizeof(buffer)) { buffer[end] = 0; reply("OSMSG_BADWORD_LIST", buffer); @@ -1554,6 +1571,10 @@ struct trusted_host *th; char length[INTERVALLEN], issued[INTERVALLEN], limit[32]; + reply("OSMSG_TRUSTED_LIST"); + reply("OSMSG_TRUSTED_LIST_BAR"); + reply("OSMSG_TRUSTED_LIST_HEADER"); + reply("OSMSG_TRUSTED_LIST_BAR"); if (argc > 1) { th = dict_find(opserv_trusted_hosts, argv[1], NULL); if (th) { @@ -1562,19 +1583,18 @@ if (th->expires) intervalString(length, th->expires - now, user->handle_info); if (th->limit) - sprintf(limit, "limit %lu", th->limit); + sprintf(limit, "%lu", th->limit); reply("OSMSG_HOST_IS_TRUSTED", th->ipaddr, - (th->limit ? limit : "no limit"), - (th->issued ? issued : "some time"), + (th->limit ? limit : "none"), (th->issuer ? th->issuer : "<unknown>"), - (th->expires ? length : "never"), - (th->reason ? th->reason : "<unknown>")); + (th->issued ? issued : "some time"), + (th->expires ? length : "never")); + reply("OSMSG_HOST_IS_TRUSTED_DESC", (th->reason ? th->reason : "<unknown>")); } else { reply("OSMSG_HOST_NOT_TRUSTED", argv[1]); } } else { - reply("OSMSG_TRUSTED_LIST"); for (it = dict_first(opserv_trusted_hosts); it; it = iter_next(it)) { th = iter_data(it); if (th->issued) @@ -1582,15 +1602,16 @@ if (th->expires) intervalString(length, th->expires - now, user->handle_info); if (th->limit) - sprintf(limit, "limit %lu", th->limit); + sprintf(limit, "%lu", th->limit); reply("OSMSG_HOST_IS_TRUSTED", iter_key(it), - (th->limit ? limit : "no limit"), - (th->issued ? issued : "some time"), + (th->limit ? limit : "none"), (th->issuer ? th->issuer : "<unknown>"), - (th->expires ? length : "never"), - (th->reason ? th->reason : "<unknown>")); + (th->issued ? issued : "some time"), + (th->expires ? length : "never")); + reply("OSMSG_HOST_IS_TRUSTED_DESC", (th->reason ? th->reason : "<unknown>")); } } + reply("OSMSG_TRUSTED_LIST_END"); return 1; } @@ -1636,6 +1657,9 @@ const char *reaction; reply("OSMSG_ALERTS_LIST"); + reply("OSMSG_ALERTS_BAR"); + reply("OSMSG_ALERTS_HEADER"); + reply("OSMSG_ALERTS_BAR"); for (it = dict_first(opserv_user_alerts); it; it = iter_next(it)) { alert = iter_data(it); switch (alert->reaction) { @@ -1644,8 +1668,10 @@ case REACT_GLINE: reaction = "gline"; break; default: reaction = "<unknown>"; break; } - reply("OSMSG_ALERT_IS", iter_key(it), alert->owner, reaction, alert->text_discrim); + reply("OSMSG_ALERT_IS", iter_key(it), reaction, alert->owner); + reply("OSMSG_ALERTS_DESC", alert->text_discrim); } + reply("OSMSG_ALERT_END"); return 1; } @@ -1695,6 +1721,7 @@ return 1; } +/* static MODCMD_FUNC(cmd_stats_warn) { dict_iterator_t it; @@ -1704,6 +1731,7 @@ reply("OSMSG_WARN_LISTEND"); return 1; } +*/ #if defined(WITH_MALLOC_X3) static MODCMD_FUNC(cmd_stats_memory) { @@ -1720,9 +1748,9 @@ send_message_type(MSG_TYPE_NOXLATE, user, cmd->parent->bot, "%u allocations in %u slabs totalling %u bytes.", slab_alloc_count, slab_count, slab_alloc_size); - send_message_type(MSG_TYPE_NOXLATE, user, cmd->parent->bot, +/* send_message_type(MSG_TYPE_NOXLATE, user, cmd->parent->bot, "%u big allocations totalling %u bytes.", - + */ return 1; } #endif @@ -1964,6 +1992,7 @@ timeq_add(now + opserv_conf.purge_lock_delay, opserv_part_channel, channel); } +/* static void opserv_channel_check(struct chanNode *newchan) { @@ -1979,9 +2008,10 @@ global_message(MESSAGE_RECIPIENT_OPERS, message); } - /* Wait until the join check to shut channels down. */ + * Wait until the join check to shut channels down. * newchan->bad_channel = opserv_bad_channel(newchan->name); } +*/ static void opserv_channel_delete(struct chanNode *chan) @@ -2712,19 +2742,21 @@ return alert; } +/* static int add_chan_warn(const char *key, void *data, UNUSED_ARG(void *extra)) { struct record_data *rd = data; char *reason = GET_RECORD_QSTRING(rd); - /* i hope this can't happen */ + * i hope this can't happen * if (!reason) reason = "No Reason"; dict_insert(opserv_chan_warn, strdup(key), strdup(reason)); return 0; } +*/ static int add_user_alert(const char *key, void *data, UNUSED_ARG(void *extra)) @@ -2842,8 +2874,10 @@ dict_foreach(object, add_gag_helper, NULL); if ((object = database_get_data(conf_db, KEY_ALERTS, RECDB_OBJECT))) dict_foreach(object, add_user_alert, NULL); +/* if ((object = database_get_data(conf_db, KEY_WARN, RECDB_OBJECT))) dict_foreach(object, add_chan_warn, NULL); +*/ return 0; } @@ -2909,6 +2943,7 @@ saxdb_end_record(ctx); } /* channel warnings */ + /* if (dict_size(opserv_chan_warn)) { saxdb_start_record(ctx, KEY_WARN, 0); for (it = dict_first(opserv_chan_warn); it; it = iter_next(it)) { @@ -2916,6 +2951,7 @@ } saxdb_end_record(ctx); } + */ /* alerts */ if (dict_size(opserv_user_alerts)) { saxdb_start_record(ctx, KEY_ALERTS, 1); @@ -3343,9 +3379,9 @@ { struct discrim_and_source *das = extra; if (match->handle_info) { - send_message_type(4, das->source, opserv, "%-15s\002!\002%15s\002@\002%s %s", match->nick, match->ident, match->hostname, match->handle_info->handle); + send_message_type(4, das->source, opserv, "%-15s\002 \002%10s\002@\002%s (%s)", match->nick, match->ident, match->hostname, match->handle_info->handle); } else { - send_message_type(4, das->source, opserv, "%-15s\002!\002%15s\002@\002%s", match->nick, match->ident, match->hostname); + send_message_type(4, das->source, opserv, "%-15s\002 \002%10s\002@\002%s", match->nick, match->ident, match->hostname); } return 0; } @@ -3529,7 +3565,12 @@ return 0; if (action == trace_print_func) + { reply("OSMSG_USER_SEARCH_RESULTS"); + reply("OSMSG_USER_SEARCH_BAR"); + reply("OSMSG_USER_SEARCH_HEADER"); + reply("OSMSG_USER_SEARCH_BAR"); + } else if (action == trace_count_func) das.discrim->limit = INT_MAX; else if ((action == trace_gline_func) && !das.discrim->duration) @@ -3547,7 +3588,7 @@ dict_foreach(das.dict, opserv_show_hostinfo, &das); if (matches) - reply("MSG_MATCH_COUNT", matches); + reply("OSMSG_USER_SEARCH_COUNT", matches); else reply("MSG_NO_MATCHES"); @@ -4145,10 +4186,13 @@ opserv_trusted_hosts = dict_new(); dict_set_free_data(opserv_trusted_hosts, free_trusted_host); /* set up opserv_chan_warn dict */ + +/* alert trace notice channel #x replaces warnings dict_delete(opserv_chan_warn); opserv_chan_warn = dict_new(); dict_set_free_keys(opserv_chan_warn, free); dict_set_free_data(opserv_chan_warn, free); +*/ /* set up opserv_user_alerts */ dict_delete(opserv_channel_alerts); opserv_channel_alerts = dict_new(); @@ -4172,7 +4216,7 @@ { unsigned int nn; - dict_delete(opserv_chan_warn); +/* dict_delete(opserv_chan_warn); */ dict_delete(opserv_reserved_nick_dict); free_string_list(opserv_bad_words); dict_delete(opserv_exempt_channels); @@ -4277,7 +4321,7 @@ opserv_define_func("STATS TRUSTED", cmd_stats_trusted, 0, 0, 0); opserv_define_func("STATS UPLINK", cmd_stats_uplink, 0, 0, 0); opserv_define_func("STATS UPTIME", cmd_stats_uptime, 0, 0, 0); - opserv_define_func("STATS WARN", cmd_stats_warn, 0, 0, 0); +/* opserv_define_func("STATS WARN", cmd_stats_warn, 0, 0, 0); */ #if defined(WITH_MALLOC_X3) || defined(WITH_MALLOC_SLAB) opserv_define_func("STATS MEMORY", cmd_stats_memory, 0, 0, 0); #endif @@ -4294,9 +4338,9 @@ modcmd_register(opserv_module, "GTRACE UNGLINE", NULL, 0, 0, "template", "ungline", NULL); opserv_define_func("UNJUPE", cmd_unjupe, 900, 0, 2); opserv_define_func("UNRESERVE", cmd_unreserve, 800, 0, 2); - opserv_define_func("UNWARN", cmd_unwarn, 800, 0, 0); +/* opserv_define_func("UNWARN", cmd_unwarn, 800, 0, 0); */ opserv_define_func("VOICEALL", cmd_voiceall, 300, 2, 0); - opserv_define_func("WARN", cmd_warn, 800, 0, 2); +/* opserv_define_func("WARN", cmd_warn, 800, 0, 2); */ opserv_define_func("WHOIS", cmd_whois, 0, 0, 2); opserv_reserved_nick_dict = dict_new(); @@ -4307,7 +4351,7 @@ reg_new_user_func(opserv_new_user_check); reg_nick_change_func(opserv_alert_check_nick); reg_del_user_func(opserv_user_cleanup); - reg_new_channel_func(opserv_channel_check); +/* reg_new_channel_func(opserv_channel_check); */ reg_del_channel_func(opserv_channel_delete); reg_join_func(opserv_join_check); reg_auth_func(opserv_staff_alert); Index: x3/src/opserv.help diff -u x3/src/opserv.help:1.5 x3/src/opserv.help:1.6 --- x3/src/opserv.help:1.5 Sun Mar 6 19:51:24 2005 +++ x3/src/opserv.help Sat Mar 19 17:11:35 2005 @@ -52,9 +52,6 @@ " $bADDALERT$b Make $O automatically do something", " when users match a criteria.", " $bDELALERT$b Remove an alert.", - " $bWARN$b Cause activity on a channel to warn", - " $b$b ircops.", - " $bUNWARN$b Remove a channel activity warning.", " $bSTATS ALERT$b See a listing of alerts. ", "=--------------- End of Help ----------------=" ); @@ -318,7 +315,7 @@ "ADDBAD" ("/msg $O ADDBAD <word>", "Adds a bad word to $b$O's$b bad word list. Bad words make any channel that has a bad word anywhere in a channel's name illegal. A list of current bad words can be displayed by $bstats bad$b.", "Access level: $b${level/addbad}$b", - "$uSee Also:$u addexempt, delbad, stats" + "$uSee Also:$u addexempt, delbad, stats bad, $C:noregister" ); "ADDEXEMPT" ("/msg $O ADDEXEMPT <#channel>", @@ -332,7 +329,7 @@ "DELBAD" ("/msg $O DELBAD <keyword>", "Deletes a bad word from $b$O's$b bad word list. Bad words make any channel that has a bad word anywhere in a channel's name illegal. A list of current bad words can be displayed by $bstats bad$b.", "Access level: $b${level/delbad}$b", - "$uSee Also:$u addbad, delexempt, stats" + "$uSee Also:$u addbad, delexempt, stats bad, $C:allowregister" ); "DELEXEMPT" ("/msg $O DELEXEMPT <#channel>", @@ -341,18 +338,6 @@ "$uSee Also:$u addexempt, delbad, stats" ); -"UNWARN" ("/msg $O UNWARN <#channel>", - "Deletes the activity warning for a channel.", - "Access level: $b${level/unwarn}$b", - "$uSee Also:$u warn, stats warn" - ); - -"WARN" ("/msg $O WARN <#channel> [reason]", - "Adds an activity warning for the channel.", - "Access level: $b${level/warn}$b", - "$uSee Also:$u unwarn, stats warn" - ); - "BAN" ("/msg $O BAN <#channel> <nick|hostmask>", "Bans the specified hostmask from the specified channel.", "If a nick is used instead of hostmask, the hostmask is generated based on the nickname.", @@ -621,9 +606,10 @@ ); "GAG" ("/msg $O GAG <mask> <duration> <reason>", - "Sets a complete services-wide ignore on all users matching the provided mask. All services will completely ignore all private messages or notices from gagged users, who are only notified when a gag goes into effect, or they sign onto the network. Gags have no effect on opers, and as a safety feature, only affect the first 250 matching users. The gag will automatically expire after $b<duration>$b (or last forever if that is zero).", + "Sets a complete services-wide ignore on all users matching the provided mask. All services will completely ignore all private messages or notices from gagged users.", + "The gag will automatically expire after $b<duration>$b (or last forever if that is zero).", "Access level: $b${level/gag}$b", - "$uSee Also:$u ungag, trace" + "$uSee Also:$u ungag, trace, stats gags" ); "HELPSERV" ("/msg $O HELPSERV <command>", @@ -644,7 +630,7 @@ ); "UNGAG" ("/msg $O UNGAG <hostmask>", - "Ungags a gaged hostmask and displays how many users were affected by $bungag$b. You can get a list of gaged hostmasks from $bgags$b.", + "Ungags a gaged hostmask.", "Access level: $b${level/ungag}$b", "$uSee Also:$u gag, stats gags" ); @@ -685,7 +671,6 @@ "$bTIMEQ$b: The number of events in the timeq, and how long until the next one.", "$bTRUSTED$b: The list of currently trusted IPs.", "$bUPTIME$b: X3 uptime, lines processed, and CPU time.", - "$bWARN$b: The list of channels with activity warnings.", "$bMODULES$b: Shows loaded modules that implement commands.", "$bSERVICES$b: Shows active service bots.", "Access level: $b${level/stats}$b", Index: x3/src/sendmail.c diff -u x3/src/sendmail.c:1.2 x3/src/sendmail.c:1.3 --- x3/src/sendmail.c:1.2 Sat Mar 12 12:13:14 2005 +++ x3/src/sendmail.c Sat Mar 19 17:11:35 2005 @@ -34,7 +34,9 @@ { "MAILMSG_EMAIL_BANNED", "Email to %s has been forbidden." }, { "MAILMSG_EMAIL_NOT_BANNED", "Email to %s was not forbidden." }, { "MAILMSG_EMAIL_UNBANNED", "Email to %s is now allowed." }, + { "MAILMSG_PROHIBITED_EMAIL_HEADER", "$bBanned Email Address Masks$b" }, { "MAILMSG_PROHIBITED_EMAIL", "%s: %s" }, + { "MAILMSG_PROHIBITED_EMAIL_END", "-------End of Banned Address Masks------" }, { "MAILMSG_NO_PROHIBITED_EMAIL", "All email addresses are accepted." }, { NULL, NULL } }; @@ -272,6 +274,8 @@ dict_iterator_t it; int found = 0; + reply("MAILMSG_PROHIBITED_EMAIL_HEADER"); + reply("MSG_BAR"); for (it=dict_first(prohibited_addrs); it; it=iter_next(it)) { reply("MAILMSG_PROHIBITED_EMAIL", iter_key(it), (const char*)iter_data(it)); found = 1; @@ -282,6 +286,8 @@ } if (!found) reply("MAILMSG_NO_PROHIBITED_EMAIL"); + else + reply("MAILMSG_PROHIBITED_EMAIL_END"); return 0; } Index: x3/src/tools.c diff -u x3/src/tools.c:1.10 x3/src/tools.c:1.11 --- x3/src/tools.c:1.10 Sat Mar 12 12:13:14 2005 +++ x3/src/tools.c Sat Mar 19 17:11:35 2005 @@ -767,13 +767,13 @@ if (words++ == 1) { msg = language_find_message(lang, "MSG_AND"); - pos += sprintf(output + pos, " %s ", msg); + pos += sprintf(output + pos, "%s ", msg); } if (count == 1) msg = language_find_message(lang, unit[type].msg_single); else msg = language_find_message(lang, unit[type].msg_plural); - pos += sprintf(output + pos, "%d %s", count, msg); + pos += sprintf(output + pos, "%d%s", count, msg); } output[pos] = 0; ----------------------- End of diff ----------------------- |