View Issue Details

IDProjectCategoryView StatusLast Update
0001384Anope Development (1.9.x series)Otherpublic2012-03-11 11:21
Reportercbiedl Assigned ToAdam  
PrioritylowSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Summary0001384: [PATCH] Fix double-spaced connect log message
DescriptionJust a visual thing.

If vhost.empty is true in src/users.cpp:841 (do_nick), something that happens at least when connecting to ngircd 19 (using Alex' patches), there's a double spacing in the logfile upon connect, like in (using 1.9.6, redacted)

    [Mar 07 19:44:48 2012] USERS: NICK!~USER@host.example.com (Real Name) connected to the network (irc.example.com)
    [Mar 07 19:44:54 2012] USERS: NICK!~USER@host.example.com (Real Name) disconnected from the network (irc.example.com)

(if this gets displayed using a proportional font: The issue is between "host.example.com" and "(Real Name)" in the first line.)

The first patch applies to 1.9.6 and works for me. As some work has been done here, I prepare a second one that applies to HEAD (ab25815) but is untested. I'm quite confident, though.

Cheers,
    Christoph


diff --git a/src/users.cpp b/src/users.cpp
index c5f8351..da42856 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -838,7 +838,7 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
             }
         }
 
- Log(user, "connect") << (!vhost.empty() ? Anope::string("(") + vhost + ")" : "") << " (" << user->realname << ") " << (user->ip() ? Anope::string("[") + user->ip.addr() + "] " : "") << "connected to the network (" << serv->GetName() << ")";
+ Log(user, "connect") << (!vhost.empty() ? Anope::string("(") + vhost + ") " : "") << "(" << user->realname << ") " << (user->ip() ? Anope::string("[") + user->ip.addr() + "] " : "") << "connected to the network (" << serv->GetName() << ")";
 
         bool exempt = false;
         if (user->server && user->server->IsULined())




diff --git a/src/users.cpp b/src/users.cpp
index 4e6f4e1..aa69f27 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -835,7 +835,7 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
         user->SetVIdent(username);
         user->SetModesInternal(modes.c_str());
 
- Log(user, "connect") << (!vhost.empty() ? Anope::string("(") + vhost + ")" : "") << " (" << user->realname << ") " << user->ip << " connected to the network (" << serv->GetName() << ")";
+ Log(user, "connect") << (!vhost.empty() ? Anope::string("(") + vhost + ") " : "") << "(" << user->realname << ") " << user->ip << " connected to the network (" << serv->GetName() << ")";
 
         bool exempt = false;
         if (user->server && user->server->IsULined())
TagsNo tags attached.

Activities

Adam

2012-03-11 11:21

administrator   ~0006096

Thanks, fixed in 7800375510450accf34316b4baf70c1de391ad1f

Issue History

Date Modified Username Field Change
2012-03-07 22:36 cbiedl New Issue
2012-03-11 11:21 Adam Note Added: 0006096
2012-03-11 11:21 Adam Status new => resolved
2012-03-11 11:21 Adam Resolution open => fixed
2012-03-11 11:21 Adam Assigned To => Adam