THISROOM ROOM:INFO:PRINT_NAME ROOMNAME - all are now THISROOM:NAME; they were all...
[citadel.git] / webcit / roomtokens.c
index 21b8cc4a3a11d270f986643918183cff3fa733d7..c7eec125728ff08f8070a4293c8282a6c2abf762 100644 (file)
@@ -1,21 +1,15 @@
 /*
  * Lots of different room-related operations.
  *
- * Copyright (c) 1996-2011 by the citadel.org team
+ * Copyright (c) 1996-2012 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * modify it under the terms of the GNU General Public License, version 3.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
 #include "webcit.h"
@@ -193,14 +187,7 @@ int ConditionalFloorIsVirtual(StrBuf *Target, WCTemplputParams *TP)
  *******************************************************************************/
 /**** Name ******/
 
-
-void tmplput_RoomName(StrBuf *Target, WCTemplputParams *TP)
-{
-       StrBufAppendTemplate(Target, TP, WC->CurRoom.name, 0);
-}
-
-
-void tmplput_current_room(StrBuf *Target, WCTemplputParams *TP)
+void tmplput_ThisRoom(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
 
@@ -217,14 +204,6 @@ void tmplput_ROOM_NAME(StrBuf *Target, WCTemplputParams *TP)
 {
        folder *Folder = (folder *)CTX;
 
-       if (Folder == NULL)
-       {
-               wcsession *WCC = WC;
-
-               if (WCC == NULL)
-                       return;
-               Folder = &WCC->CurRoom;
-       }
        StrBufAppendTemplate(Target, TP, Folder->name, 0);
 }
 
@@ -611,10 +590,9 @@ InitModule_ROOMTOKENS
 
        /**** Room... ******/
         /**** Name ******/
-       RegisterNamespace("ROOMNAME", 0, 1, tmplput_RoomName, NULL, CTX_NONE);
-       RegisterNamespace("CURRENT_ROOM", 0, 1, tmplput_current_room, NULL, CTX_NONE);
+       RegisterNamespace("THISROOM:NAME", 0, 1, tmplput_ThisRoom, NULL, CTX_NONE);
+
        RegisterNamespace("ROOM:INFO:NAME", 0, 1, tmplput_ROOM_NAME, NULL, CTX_ROOMS);
-       RegisterNamespace("ROOM:INFO:PRINT_NAME", 0, 1, tmplput_ROOM_NAME, NULL, CTX_NONE);
        RegisterNamespace("ROOM:INFO:BASENAME", 0, 1, tmplput_ROOM_BASENAME, NULL, CTX_ROOMS);
        RegisterNamespace("ROOM:INFO:LEVELNTIMES", 1, 2, tmplput_ROOM_LEVEL_N_TIMES, NULL, CTX_ROOMS);
        RegisterConditional(HKEY("COND:ROOM:INFO:IS_INBOX"), 0, ConditionalRoomIsInbox, CTX_ROOMS);