]> jfr.im git - irc/gameservirc.git/commitdiff
added two files to start processing scripts
authorkainazzzo <redacted>
Mon, 26 Jun 2006 05:03:09 +0000 (05:03 +0000)
committerkainazzzo <redacted>
Mon, 26 Jun 2006 05:03:09 +0000 (05:03 +0000)
git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@452 bc333340-6410-0410-a689-9d09f3c113fa

gameserv/.depend
gameserv/Makefile.in
gameserv/script.cpp [new file with mode: 0644]
gameserv/script.h [new file with mode: 0644]

index 802ba20a5c47240a2052d1e50257c9b4c73e21e3..7a92b6087c68385d5b82831705cb4436279ac186 100644 (file)
@@ -8,9 +8,10 @@ do_attack.o: do_attack.cpp aClient.h options.h player.h extern.h \
  level.h config.h item.h flags.h
 gameserv.o: gameserv.cpp aClient.h options.h player.h config.h \
  extern.h level.h item.h pouch.h flags.h sockhelp.h
-hash.o: hash.cpp extern.h player.h level.h config.h options.h item.h
+hash.o: hash.cpp extern.h player.h level.h config.h options.h item.h \
+ aClient.h
 item.o: item.cpp item.h level.h player.h extern.h config.h options.h
-level.o: level.cpp item.h level.h extern.h player.h config.h options.h
+level.o: level.cpp item.h level.h player.h extern.h config.h options.h
 log.o: log.cpp extern.h player.h level.h config.h options.h item.h
 news.o: news.cpp extern.h player.h level.h config.h options.h item.h
 pouch.o: pouch.cpp extern.h player.h level.h config.h options.h item.h \
index 9327e199c5ecbda021cc83c58c69e4d0358d0478..72d2149619fe56b975fed7312819ba237ab8c321 100644 (file)
@@ -33,6 +33,7 @@ TSRCS =       aClient.cpp \
        news.cpp \
        pouch.cpp \
        player.cpp \
+       script.cpp \
        sockhelp.cpp
 
 CONSOLESRCS = $(TSRCS) $(CONSOLEDRIVER)
diff --git a/gameserv/script.cpp b/gameserv/script.cpp
new file mode 100644 (file)
index 0000000..dcfed55
--- /dev/null
@@ -0,0 +1,36 @@
+#include "script.h"
+
+script::script()
+{
+  scriptstr = "";
+}
+
+script::script(string &str)
+{
+  scriptstr = str;
+}
+
+script::script(const char *str)
+{
+  scriptstr = str;
+}
+
+script::~script()
+{
+  scriptstr = "";
+}
+
+void script::setString(string &str)
+{
+  scriptstr = str;
+}
+
+void script::setString(const char *str)
+{
+  scriptstr = str;
+}
+
+bool script::executeScript(Player *p)
+{
+  return true;
+}
diff --git a/gameserv/script.h b/gameserv/script.h
new file mode 100644 (file)
index 0000000..5925bbc
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef SCRIPT_H
+#define SCRIPT_H
+
+#include <string>
+
+using namespace std;
+
+class Player; // Forward declaration
+
+class script
+{
+public:
+  script(); // Default constructor
+  script(string &str); // Copy constructor
+  script(const char *str); // Copy constructor
+
+  void setString(string &str);
+  void setString(const char *str);
+
+  bool executeScript(Player *p); // Run the script against a player
+  
+  ~script(); // Destructor
+private:
+  string scriptstr;
+};
+
+#endif