mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Allow for nick!user@host in TOPIC information.
Note that this adds another <options> tag value, 'hostintopic'. (defaults to yes) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6572 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
750f9e2937
commit
b111eec597
@ -769,7 +769,7 @@
|
||||
# NOTICE and PRIVMSG adding the prefix to the line #
|
||||
# of text sent out. Eg. NOTICE @#test :@ testing #
|
||||
# vs off: NOTICE @#test :testing #
|
||||
#
|
||||
# #
|
||||
# notimesync - If this value is 'yes', 'true', or '1', time #
|
||||
# synchronization is disabled on this server. This #
|
||||
# means any servers you are linked to will not #
|
||||
@ -778,6 +778,10 @@
|
||||
# on netsplits. This option should be the same on #
|
||||
# all servers. #
|
||||
# #
|
||||
# hostintopic - If this is set to yes (the default) then the full #
|
||||
# nick!user@host is shown for who set a TOPIC last. #
|
||||
# if set to no, then only the nickname is shown. #
|
||||
# #
|
||||
|
||||
<options prefixquit="Quit: "
|
||||
loglevel="default"
|
||||
@ -803,6 +807,7 @@
|
||||
ircumsgprefix="no"
|
||||
announcets="yes"
|
||||
notimesync="no"
|
||||
hostintopic="yes"
|
||||
allowhalfop="yes">
|
||||
|
||||
#-#-#-#-#-#-#-#-#-#-#-#-#- WHOWAS OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||
|
@ -178,7 +178,7 @@ class chanrec : public Extensible
|
||||
/** The last user to set the topic.
|
||||
* If this member is an empty string, no topic was ever set.
|
||||
*/
|
||||
char setby[NICKMAX];
|
||||
char setby[128];
|
||||
|
||||
/** Contains the channel user limit.
|
||||
* If this value is zero, there is no limit in place.
|
||||
|
@ -503,6 +503,11 @@ class ServerConfig : public Extensible
|
||||
*/
|
||||
bool UndernetMsgPrefix;
|
||||
|
||||
/** If set to true, the full nick!user@host will be shown in the TOPIC command
|
||||
* for who set the topic last. If false, only the nick is shown.
|
||||
*/
|
||||
bool FullHostInTopic;
|
||||
|
||||
/** All oper type definitions from the config file
|
||||
*/
|
||||
opertype_t opertypes;
|
||||
|
@ -95,7 +95,11 @@ CmdResult cmd_topic::Handle (const char** parameters, int pcnt, userrec *user)
|
||||
strlcpy(Ptr->topic, parameters[1], MAXTOPIC-1);
|
||||
}
|
||||
|
||||
strlcpy(Ptr->setby,user->nick,NICKMAX-1);
|
||||
if (ServerInstance->Config->FullHostInTopic)
|
||||
strlcpy(Ptr->setby,user->GetFullHost(),127);
|
||||
else
|
||||
strlcpy(Ptr->setby,user->nick,127);
|
||||
|
||||
Ptr->topicset = ServerInstance->Time();
|
||||
Ptr->WriteChannel(user, "TOPIC %s :%s", Ptr->name, Ptr->topic);
|
||||
|
||||
|
@ -588,6 +588,7 @@ void ServerConfig::Read(bool bail, userrec* user)
|
||||
{"options", "syntaxhints", "0", new ValueContainerBool (&this->SyntaxHints), DT_BOOLEAN, NoValidation},
|
||||
{"options", "cyclehosts", "0", new ValueContainerBool (&this->CycleHosts), DT_BOOLEAN, NoValidation},
|
||||
{"options", "ircumsgprefix","0", new ValueContainerBool (&this->UndernetMsgPrefix), DT_BOOLEAN, NoValidation},
|
||||
{"options", "hostintopic", "1", new ValueContainerBool (&this->FullHostInTopic), DT_BOOLEAN, NoValidation},
|
||||
{"pid", "file", "", new ValueContainerChar (this->PID), DT_CHARPTR, NoValidation},
|
||||
{"whowas", "groupsize", "10", new ValueContainerInt (&this->WhoWasGroupSize), DT_INTEGER, NoValidation},
|
||||
{"whowas", "maxgroups", "10240", new ValueContainerInt (&this->WhoWasMaxGroups), DT_INTEGER, NoValidation},
|
||||
|
@ -797,7 +797,7 @@ bool TreeSocket::ForceTopic(const std::string &source, std::deque<std::string> &
|
||||
{
|
||||
std::string oldtopic = c->topic;
|
||||
strlcpy(c->topic,params[3].c_str(),MAXTOPIC);
|
||||
strlcpy(c->setby,params[2].c_str(),NICKMAX-1);
|
||||
strlcpy(c->setby,params[2].c_str(),127);
|
||||
c->topicset = ts;
|
||||
/* if the topic text is the same as the current topic,
|
||||
* dont bother to send the TOPIC command out, just silently
|
||||
|
Loading…
x
Reference in New Issue
Block a user