All pastes #522696 Raw Edit

announce enhancement 3763

public text v1 · immutable
#522696 ·published 2007-05-30 14:31 UTC
rendered paste body
Index: src/game/Level1.cpp
===================================================================
--- src/game/Level1.cpp	(revision 3763)
+++ src/game/Level1.cpp	(working copy)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2005,2006,2007 MaNGOS <http://www.mangosproject.org/>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -104,8 +104,23 @@
     if(!*args)
         return false;
 
-    std::string str ="|cffff0000[System Message]:|r";
-    str += args;
+   std::string str = "|cffff6060";
+   if(m_session->GetPlayer()->isGameMaster())
+   {
+	   switch(m_session->GetSecurity())//switch case to determine what rank the "gm" is
+	   {
+  			case 1: str+="<Moderator";break;
+  			case 2: str+="<GameMaster";break;
+  			case 3: str+="<Administrator";break;
+	   }
+	   str+=">|r|c1f40af20";
+	   str+=m_session->GetPlayer()->GetName();
+	   str+=" :";
+   }
+   else
+      str+="[System Message]";
+   str+="|r";
+   str+=args;
     sWorld.SendWorldText(str.c_str(), NULL);
 
     return true;