From d7b1e9fb444b1e9c71dd863b1f33ada09197a0f4 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 14 Mar 2010 23:59:43 +0000 Subject: Add to configure source for mode changes on host cycle git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12636 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/configreader.h | 5 +++++ src/configreader.cpp | 1 + src/users.cpp | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/configreader.h b/include/configreader.h index 57134390a..02ed3d561 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -491,6 +491,11 @@ class CoreExport ServerConfig */ bool CycleHosts; + /** If set to true, the CycleHosts mode change will be sourced from the user, + * rather than the server + */ + bool CycleHostsFromUser; + /** If set to true, prefixed channel NOTICEs and PRIVMSGs will have the prefix * added to the outgoing text for undernet style msg prefixing. */ diff --git a/src/configreader.cpp b/src/configreader.cpp index d63377bbe..c2c66fc31 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -479,6 +479,7 @@ void ServerConfig::Fill() NoUserDns = ConfValue("performance")->getBool("nouserdns"); SyntaxHints = options->getBool("syntaxhints"); CycleHosts = options->getBool("cyclehosts"); + CycleHostsFromUser = options->getBool("cyclehostsfromuser"); UndernetMsgPrefix = options->getBool("ircumsgprefix"); FullHostInTopic = options->getBool("hostintopic"); MaxTargets = security->getInt("maxtargets", 20); diff --git a/src/users.cpp b/src/users.cpp index d30526186..8aeb4a1f6 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1393,7 +1393,9 @@ void User::DoHostCycle(const std::string &quitline) { for(unsigned int i=0; i < memb->modes.length(); i++) modeline.append(" ").append(nick); - snprintf(buffer, MAXBUF, ":%s MODE %s +%s", GetFullHost().c_str(), c->name.c_str(), modeline.c_str()); + snprintf(buffer, MAXBUF, ":%s MODE %s +%s", + ServerInstance->Config->CycleHostsFromUser ? GetFullHost().c_str() : ServerInstance->Config->ServerName.c_str(), + c->name.c_str(), modeline.c_str()); modeline = buffer; } -- cgit v1.2.3