Anope Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001279Anope Development (1.9.x series)Otherpublic2011-06-28 00:142011-07-05 03:41
ReporterNita 
Assigned ToAdam 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSDebianOS VersionSqueeze
Product Version 
Target VersionFixed in Version 
Summary0001279: 1.9.5 current: /ns info, /cs info display bug
DescriptionThere is a bug in current (1.9.5 devel) Anope with /ns info USER, /cs info USER.

/ns info USER output:
 -NickServ- Time registered: %b %d %H:%M:%S %Y %Z (85 days, 9 hounslaters, 45 minutes ago)
 -NickServ- Last seen time: %b %d %H:%M:%S %Y %Z (8 days, 2 hounslaters, 7 minutes ago)

/cs info #CHAN output:
 -ChanServ- Registered: %b %d %H:%M:%S %Y %Z (325 days, 2 hounslaters, 16 minutes ago)
 -ChanServ- Last used: %b %d %H:%M:%S %Y %Z (0 seconds from now)

There are only variable names in the output: %b %d %H:%M:%S %Y %Z
Steps To Reproduce/ns info user
/cs info user
TagsNo tags attached.
Attached Filesjpg file icon variables_bug.jpg [^] (14,721 bytes) 2011-06-28 00:14

- Relationships

-  Notes
(0005855)
Adam (administrator)
2011-07-05 03:41

Fixed in c549aa4e76bde4b52e877738729b1acdbac4334a
(0005852)
someone (reporter)
2011-07-04 19:22

diff --git a/src/misc.cpp b/src/misc.cpp
index da07eaa..64c3f4b 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -240,7 +240,9 @@ Anope::string duration(const time_t &t, NickCore *nc)
 Anope::string do_strftime(const time_t &t, NickCore *nc, bool short_output)
 {
        tm tm = *localtime(&t);
- const char *buf = translate(nc, _("%b %d %H:%M:%S %Y %Z"));
+ const char *format = translate(nc, _("%b %d %H:%M:%S %Y %Z"));
+ char buf[BUFSIZE];
+ strftime(buf, sizeof(buf), format, &tm);
        if (short_output)
                return buf;
        if (t < Anope::CurTime)

should fix that
(0005848)
Nita (reporter)
2011-06-28 00:16

Misspelled: /cs info #CHAN instead of /cs info USER

- Issue History
Date Modified Username Field Change
2011-06-28 00:14 Nita New Issue
2011-06-28 00:14 Nita File Added: variables_bug.jpg
2011-06-28 00:16 Nita Note Added: 0005848
2011-07-04 19:22 someone Note Added: 0005852
2011-07-05 03:41 Adam Note Added: 0005855
2011-07-05 03:41 Adam Status new => resolved
2011-07-05 03:41 Adam Resolution open => fixed
2011-07-05 03:41 Adam Assigned To => Adam


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker