X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=09b96ce6bf14eebd0de3f0d43b5ee3bd1b8c64b0;hb=e2ff1fd474983a17961b5b00ce58b2b77d06192e;hp=95ae87f5dd067fbd887a64f81c688c13966d261b;hpb=eb7a2a9ea631b9a4d31709d6a36a5d70d3770d27;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 95ae87f5d..09b96ce6b 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -314,7 +314,7 @@ char* User::MakeHostIP() void User::CloseSocket() { - if (this > -1) + if (this->fd > -1) { ServerInstance->SE->Shutdown(this, 2); ServerInstance->SE->Close(this); @@ -916,12 +916,11 @@ void User::FullConnect() this->WriteServ("NOTICE Auth :Welcome to \002%s\002!",ServerInstance->Config->Network); this->WriteNumeric(001, "%s :Welcome to the %s IRC Network %s!%s@%s",this->nick, ServerInstance->Config->Network, this->nick, this->ident, this->host); - this->WriteNumeric(002, "%s :Your host is %s, running version %s",this->nick,ServerInstance->Config->ServerName,VERSION); + this->WriteNumeric(002, "%s :Your host is %s, running version InspIRCd-1.2",this->nick,ServerInstance->Config->ServerName); this->WriteNumeric(003, "%s :This server was created %s %s", this->nick, __TIME__, __DATE__); - this->WriteNumeric(004, "%s %s %s %s %s %s", this->nick, ServerInstance->Config->ServerName, VERSION, ServerInstance->Modes->UserModeList().c_str(), ServerInstance->Modes->ChannelModeList().c_str(), ServerInstance->Modes->ParaModeList().c_str()); + this->WriteNumeric(004, "%s %s InspIRCd-1.2 %s %s %s", this->nick, ServerInstance->Config->ServerName, ServerInstance->Modes->UserModeList().c_str(), ServerInstance->Modes->ChannelModeList().c_str(), ServerInstance->Modes->ParaModeList().c_str()); ServerInstance->Config->Send005(this); - this->WriteNumeric(42, "%s %s :your unique ID", this->nick, this->uuid); @@ -1450,7 +1449,7 @@ void User::WriteCommonExcept(const std::string &text) void User::WriteWallOps(const std::string &text) { - if (!IS_OPER(this) && IS_LOCAL(this)) + if (!IS_LOCAL(this)) return; std::string wallop("WALLOPS :"); @@ -1466,6 +1465,9 @@ void User::WriteWallOps(const std::string &text) void User::WriteWallOps(const char* text, ...) { + if (!IS_LOCAL(this)) + return; + char textbuffer[MAXBUF]; va_list argsPtr;