extern.h list.h listnode.h flags.h myString.h sockhelp.h
log.o: log.cpp extern.h player.h aClient.h options.h pouch.h list.h \
listnode.h config.h
-myString.o: myString.cpp myString.h
player.o: player.cpp player.h aClient.h options.h pouch.h extern.h list.h \
listnode.h config.h flags.h
sockhelp.o: sockhelp.cpp sockhelp.h extern.h player.h aClient.h options.h \
-* = Not finished
+* = Not Started
- = Started
X = Finsihed
+- Daily news (murders, kidnappings, level gains, red dragon slayings)
+
* Add a function to check how long until gameserv refreshes
-- Gangs of people that can get together and fight other gangs in large
+* Gangs of people that can get together and fight other gangs in large
group battles
- gang names
- gangs.dat file with numbers assigned to gangs
* Change your name for a price :)
-* Daily news (murders, kidnappings, level gains, red dragon slayings)
-
* Add a drop command for all(their own nick)/admin(any nick)
* Rejoin the bot if kicked/killed
#include "extern.h"
#include "flags.h"
#include "list.h"
+#include "myString.h"
#include "sockhelp.h"
#include <cctype>
do_tavern(source);
} else if (stricmp(cmd, "LIST") == 0) {
do_list(source);
+ #ifdef DEBUGMODE
+ } else if (stricmp(cmd, "PRINT") == 0) {
+ List<myString> news;
+ myString *st;
+ st = new myString("This is a test");
+ cout << news.insertAtBack_RLN(st)->getData() << endl;
+ cout << st << endl;
+ news.print();
+ delete st;
+ #endif
} else if (stricmp(cmd, "LOGOUT") == 0) {
do_logout(source);
} else if (stricmp(cmd, "REGISTER") == 0) {
currentPtr = firstPtr;
while (currentPtr)
{
+ /*
cout << "aClient: " << *currentPtr->getData() << flush;
if (currentPtr->getData()->stats)
cout << " Player Name: " << currentPtr->getData()->stats->name
<< " Password: " << currentPtr->getData()->stats->password << flush;
cout << endl;
+ */
+ cout << currentPtr->getData()->getString() << endl;
currentPtr = currentPtr->next;
}
}
{
if (!s)
{
- ~myString();
+ if (string)
+ delete [] string;
+
+ string = NULL;
}
else
{
#ifndef MYSTRING_H
#define MYSTRING_H
+#include <string.h>
class myString {
public:
void setString(char *s);
char *getString() { return string; };
unsigned int len() { return strlen(string); };
+ bool isNULL() { return string == NULL; };
private:
char *string;
delete []conf;
// Turn into a daemon
+
if (daemon(1,0) < 0)
{
perror("Could not turn into a daemon");
exit(3);
}
+
init_masters();
load_gs_dbase();