mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Make it optional to show opermotd on /OPER, defaults to showing the motd if not specified.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10930 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
5ea3005897
commit
ea5245d625
@ -1084,7 +1084,10 @@
|
||||
# #
|
||||
# If you are using the m_opermotd.so module, specify the motd here #
|
||||
# #
|
||||
#<opermotd file="oper.motd">
|
||||
# onoper - Should the message be sent on /OPER or only when #
|
||||
# /OPERMOTD is used. Use "yes" or "no". #
|
||||
# #
|
||||
#<opermotd file="oper.motd" onoper="yes">
|
||||
|
||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||
# Override module: Adds support for oper override
|
||||
|
@ -59,6 +59,7 @@ class CommandOpermotd : public Command
|
||||
class ModuleOpermotd : public Module
|
||||
{
|
||||
CommandOpermotd* mycommand;
|
||||
bool onoper;
|
||||
public:
|
||||
|
||||
void LoadOperMOTD()
|
||||
@ -72,6 +73,7 @@ class ModuleOpermotd : public Module
|
||||
opermotd = NULL;
|
||||
}
|
||||
opermotd = new FileReader(ServerInstance, filename);
|
||||
onoper = conf->ReadFlag("opermoth","onoper","yes",0);
|
||||
delete conf;
|
||||
}
|
||||
|
||||
@ -99,6 +101,7 @@ class ModuleOpermotd : public Module
|
||||
|
||||
virtual void OnOper(User* user, const std::string &opertype)
|
||||
{
|
||||
if (onoper)
|
||||
ShowOperMOTD(user);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user