Index: src/modules/m_botmode.cpp
===================================================================
--- src/modules/m_botmode.cpp	(revision 80)
+++ src/modules/m_botmode.cpp	(working copy)
@@ -19,8 +19,48 @@
 #include "modules.h"
 #include "configreader.h"
 
-/* $ModDesc: Provides support for unreal-style umode +B */
+/* $ModDesc: Provides support for unreal-style umode +B (including BOTMOTD) */
 
+static FileReader* botmotd;
+
+CmdResult ShowBotMOTD(userrec* user)
+{
+	if(!botmotd->FileSize())
+	{
+		user->WriteServ(std::string("NOTICE ") + user->nick + std::string(" :BOTMOTD File not found"));
+		return CMD_FAILURE;
+	}
+
+	user->WriteServ(std::string("NOTICE ") + user->nick + std::string(" :- ") + user->server + std::string(" Bot Message of the Day -"));
+
+	for(int i=0; i != botmotd->FileSize(); i++)
+	{
+		user->WriteServ(std::string("NOTICE ") + user->nick + std::string(" :- ") + botmotd->GetLine(i));
+	}
+
+	user->WriteServ(std::string("NOTICE ") + user->nick + std::string(" :End of /BOTMOTD command."));
+
+	/* don't route me */
+	return CMD_LOCALONLY;
+}
+
+/** Handle /BOTMOTD
+ */
+class cmd_botmotd : public command_t
+{
+ public:
+	cmd_botmotd (InspIRCd* Instance) : command_t(Instance,"BOTMOTD",0,0)
+	{
+		this->source = "m_botmode.so";
+		syntax = "[<servername>]";
+	}
+
+	CmdResult Handle (const char** parameters, int pcnt, userrec* user)
+	{
+		return ShowBotMOTD(user);
+	}
+};
+
 /** Handles user mode +B
  */
 class BotMode : public ModeHandler
@@ -35,6 +75,7 @@
 			if (!dest->IsModeSet('B'))
 			{
 				dest->SetMode('B',true);
+				ShowBotMOTD(dest);
 				return MODEACTION_ALLOW;
 			}
 		}
@@ -46,20 +87,24 @@
 				return MODEACTION_ALLOW;
 			}
 		}
-		
+
 		return MODEACTION_DENY;
 	}
 };
 
 class ModuleBotMode : public Module
 {
-	
+	cmd_botmotd* mycommand;	
 	BotMode* bm;
  public:
 	ModuleBotMode(InspIRCd* Me)
 		: Module(Me)
 	{
-		
+		botmotd = NULL;
+		mycommand = new cmd_botmotd(ServerInstance);
+		ServerInstance->AddCommand(mycommand);
+		botmotd = new FileReader(ServerInstance);
+		LoadBotMOTD();		
 		bm = new BotMode(ServerInstance);
 		if (!ServerInstance->AddMode(bm, 'B'))
 			throw ModuleException("Could not add new modes!");
@@ -69,13 +114,27 @@
 	{
 		List[I_OnWhois] = 1;
 	}
-	
+
+	void LoadBotMOTD()
+	{
+		ConfigReader* conf = new ConfigReader(ServerInstance);
+		std::string filename;
+		filename = conf->ReadValue("botmotd","file",0);
+		if (botmotd)
+		{
+			delete botmotd;
+			botmotd = NULL;
+		}
+		botmotd = new FileReader(ServerInstance, filename);
+		DELETE(conf);
+	}
+
 	virtual ~ModuleBotMode()
 	{
 		ServerInstance->Modes->DelMode(bm);
 		DELETE(bm);
 	}
-	
+
 	virtual Version GetVersion()
 	{
 		return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
@@ -85,11 +144,19 @@
 	{
 		if (dst->IsModeSet('B'))
 		{
-			ServerInstance->SendWhoisLine(src, dst, 335, std::string(src->nick)+" "+std::string(dst->nick)+" :is a bot on "+ServerInstance->Config->Network);
+			ServerInstance->SendWhoisLine(src, dst, 335, std::string(src->nick)+" "+std::string(dst->nick)+" :is a Bot on "+ServerInstance->Config->Network);
 		}
 	}
 
+	virtual void OnOper(userrec* user, const std::string &opertype)
+	{	
+		ShowBotMOTD(user);
+	}
+
+	virtual void OnRehash(userrec* user, const std::string &parameter)
+	{
+		LoadBotMOTD();
+	}
 };
 
-
 MODULE_INIT(ModuleBotMode)
Index: docs/unrealircd.conf.example
===================================================================
--- docs/unrealircd.conf.example	(revision 80)
+++ docs/unrealircd.conf.example	(working copy)
@@ -1160,6 +1160,12 @@
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 # Botmode module: Adds the user mode +B
 <module name="m_botmode.so">
+#
+#-#-#-#-#-#-#-#-#-#-#-   BOTMOTD CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#
+#                                                                     #
+# If you are using the m_botmode.so module, specify the motd here     #
+#                                                                     #
+#<botmotd file="bot.motd">
 
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 # Censor module: Adds the channel mode +G
