Author Topic: DS 2.1.1 and LoginSite  (Read 1738 times)

Offline llyr

  • Pottymouth
  • *
  • Posts: 1
    • View Profile
DS 2.1.1 and LoginSite
« on: October 20, 2006, 11:58:59 AM »
In order to help facilitate being able to easily move characters to different rooms at login based on attributes, interactive.c needed a little tweaking. Specifically, it provided no get or set methods for the LoginSite variable. A patch follows, which contains the interactive.c changes and an example usage in /secure/lib/connect.c.



code:

diff -r c285c760f457 lib/lib/interactive.c
--- a/lib/lib/interactive.c     Thu Oct 12 10:15:00 2006 -0700
+++ b/lib/lib/interactive.c     Fri Oct 20 11:55:50 2006 -0700
@@ -682,3 +682,11 @@ void eventDescribeEnvironment(int brief)
            }
            return (WebPage = page);
        }
+
+string SetLoginSite(string site) {
+  return LoginSite = site;
+}
+
+string GetLoginSite() {
+  return LoginSite;
+}
diff -r c285c760f457 lib/secure/lib/connect.c
--- a/lib/secure/lib/connect.c  Thu Oct 12 10:15:00 2006 -0700
+++ b/lib/secure/lib/connect.c  Fri Oct 20 11:24:53 2006 -0700
@@ -456,6 +456,7 @@ static void cmdPick(string args) {
     this_player()->SetTerminal("ansi");
     PLAYERS_D->AddPlayerInfo(Name);
     call_out( (: eventCre, Name :), 3);
+    Player->SetLoginSite("/domains/town/room/mayor");
     eventEnterGame();
 }


Offline capo

  • Friend
  • **
  • Posts: 70
    • View Profile
DS 2.1.1 and LoginSite
« Reply #1 on: October 20, 2006, 12:32:59 PM »

Looks great!



Thanks