[Ante-cvs] SF.net SVN: ante: [481] trunk/ant
Brought to you by:
roguestar191
|
From: <rog...@us...> - 2007-01-24 08:42:10
|
Revision: 481
http://svn.sourceforge.net/ante/?rev=481&view=rev
Author: roguestar191
Date: 2007-01-24 00:42:10 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
clean of snoop, todo is getting small
Modified Paths:
--------------
trunk/ant/cgiscript.cpp
trunk/ant/command.cpp
trunk/ant/mud.cpp
trunk/ant/objects.cpp
trunk/ant/todo
trunk/ant/tools.cpp
trunk/ant/tools.h
Modified: trunk/ant/cgiscript.cpp
===================================================================
--- trunk/ant/cgiscript.cpp 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/cgiscript.cpp 2007-01-24 08:42:10 UTC (rev 481)
@@ -512,25 +512,7 @@
}
return false;
}
-bool isInOVec(std::vector<object*>&vec, object*ithis) {
- std::vector<object*>::iterator iter = vec.begin(), end = vec.end();
- while(iter != end) {
- if((*(iter)) == ithis) return true;
- iter++;
- }
- return false;
-}
-void remFromOVec(std::vector<object*>&vec, object*ithis) {
- std::vector<object*>::iterator iter = vec.begin(), end = vec.end();
- while(iter != end) {
- if((*(iter)) == ithis) { vec.erase(iter); return; }
- iter++;
- }
- return;
-}
-void addToOVec(std::vector<object*>&vec, object*ithis) {
- vec.push_back(ithis);
-}
+
extern void replaceAll(std::string &in, std::string from, std::string to);
std::string loaderhelper::printToAllBut(std::vector<std::string>&d, void*callera) {
if(d.size() < 3) return "";
Modified: trunk/ant/command.cpp
===================================================================
--- trunk/ant/command.cpp 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/command.cpp 2007-01-24 08:42:10 UTC (rev 481)
@@ -581,6 +581,14 @@
breaker = false; //reset our exit bool
+ if(snoopers.size() != 0) {
+ std::vector<object*>::iterator iter = snoopers.begin(), end = snoopers.end();
+ while(iter!=end) {
+ mudg->print1((*(iter)), incommand, (*(iter))->socket);
+ iter++;
+ }
+ }
+
//now make what 1CSTRARRAY relies on
// std::string newincommand;
//append incommand
Modified: trunk/ant/mud.cpp
===================================================================
--- trunk/ant/mud.cpp 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/mud.cpp 2007-01-24 08:42:10 UTC (rev 481)
@@ -1627,7 +1627,7 @@
//mud::print1(object *p_in,string *buf,sock_in) prints the string to the object on the sock_in {{{
//sock_in should default to 0
void mud::print1(object *p_in, std::string *buf, int sock_in) {
- if(p_in->snooping.size() != 0) {
+ if(p_in->snoopers.size() != 0) {
std::vector<object*>::iterator iter = p_in->snoopers.begin(), end = p_in->snoopers.end();
while(iter!=end) {
this->print1((*(iter)), buf, (*(iter))->socket);
Modified: trunk/ant/objects.cpp
===================================================================
--- trunk/ant/objects.cpp 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/objects.cpp 2007-01-24 08:42:10 UTC (rev 481)
@@ -920,7 +920,18 @@
}
*/
object::~object() {
-
+ std::vector<object*>::iterator iter = snooping.begin(), end = snooping.end();
+ while(iter!=end) {
+ remFromOVec((*(iter))->snoopers, this);
+ iter++;
+ }
+ iter = snoopers.begin(), end = snoopers.end();
+ while(iter!=end) {
+ remFromOVec((*(iter))->snooping, this);
+ iter++;
+ }
+ while(snoopers.size() != 0) snoopers.pop_back();
+ while(snooping.size() != 0) snooping.pop_back();
}
bool object::Tickme() {
Modified: trunk/ant/todo
===================================================================
--- trunk/ant/todo 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/todo 2007-01-24 08:42:10 UTC (rev 481)
@@ -1,12 +1,6 @@
NEEDS FINISHED FIRST
Step 1
-Make a fcgi script to do wear/remove/display EQUIPMENT to replace the in game command equivilents just removed - Server support is already in place
-
-Add basic give module to exploit give callback - put in skills/commands/invcontrol.cpp
-
-Add snoop ability and callback to enable/disable (1st priority)
-
Add username/IP-(un)ban script callback (2nd priority)(Module not needed, those who should have access to this should have access to totalaccess script)
On username ban it grabs the last ip of the user, and bans it, and bans any ip that tries to log into that username(successfully) until the username is unbanned. all banned ip's related to the username should be unbanned.
@@ -35,9 +29,15 @@
This Seems to not be a problem with ant.
-------------------------------------
-Not in any order
+Not in any order non-core stuff
-------------------------------------
+--Most important--
+Make a fcgi script to do wear/remove/display EQUIPMENT to replace the in game command equivilents just removed - Server support is already in place
+Add basic give module to exploit give callback - put in skills/commands/invcontrol.cpp
+
+--After that--
+
Add pipes, memory shared files, whatever alternatives to tcp can be found for simple ipc to suppliment tcp for fcgi modules (So we don't need to muck around with tcp ports..)
Add pid based control for fcgi children to fcgi object.. - See autorun
Modified: trunk/ant/tools.cpp
===================================================================
--- trunk/ant/tools.cpp 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/tools.cpp 2007-01-24 08:42:10 UTC (rev 481)
@@ -324,6 +324,29 @@
}
return std::string::npos;
}
+
+
+bool isInOVec(std::vector< object* >&vec, object* ithis) {
+ std::vector< object* >::iterator iter = vec.begin(), end = vec.end();
+ while(iter != end) {
+ if((*(iter)) == ithis) return true;
+ iter++;
+ }
+ return false;
+}
+void remFromOVec(std::vector<object*>&vec, object*ithis) {
+ std::vector<object*>::iterator iter = vec.begin(), end = vec.end();
+ while(iter != end) {
+ if((*(iter)) == ithis) { vec.erase(iter); return; }
+ iter++;
+ }
+ return;
+}
+void addToOVec(std::vector<object*>&vec, object*ithis) {
+ vec.push_back(ithis);
+}
+
+
/*
// this was actually slower...
static std::string seqbuf;// = somevars::seqbuf;
Modified: trunk/ant/tools.h
===================================================================
--- trunk/ant/tools.h 2007-01-24 08:19:13 UTC (rev 480)
+++ trunk/ant/tools.h 2007-01-24 08:42:10 UTC (rev 481)
@@ -227,4 +227,11 @@
}
return strvec;
}
+class object;
+bool isInOVec(std::vector< object* >&vec, object* ithis);
+void remFromOVec(std::vector<object*>&vec, object*ithis);
+void addToOVec(std::vector<object*>&vec, object*ithis);
+
+
#endif
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|