EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Saylink's Crashing Zone on No Target Fix (https://www.eqemulator.org/forums/showthread.php?t=31219)

Akkadius 05-03-2010 03:49 PM

Saylink's Crashing Zone on No Target Fix
 
Now I had a problem on my server which obviously isn't released yet, but with the amount saylinks that we have that aren't silent causing zone crashes were blowing up on recent revisions.

This is just a general fix that Secrets helped with and now saylinks no longer crash zones without a target, and of course still function normally.

Code:

Index: client.cpp
===================================================================
--- client.cpp        (revision 1451)
+++ client.cpp        (working copy)
@@ -737,7 +737,8 @@
        if (targetname == NULL) {
                targetname = (!GetTarget()) ? NULL : GetTarget()->GetName();
        }
-
+if(targetname)
+{
        if(RuleB(Chat, EnableAntiSpam))
        {
                if(strcmp(targetname, "discard") != 0)
@@ -758,7 +759,7 @@
                               
                                if(RuleI(Chat, MinStatusToBypassAntiSpam) <= Admin())
                                        AllowedMessages = 10000;
-
+                               
                                AttemptedMessages++;
                                if(AttemptedMessages > AllowedMessages)
                                {
@@ -782,6 +783,7 @@
                        }
                }
        }
+        }
 
        switch(chan_num)
        {


trevius 05-03-2010 09:22 PM

I briefly looked this over, but I am not seeing where the crash would be caused from the code before making that change.

Saylinks just send this from client_packet.cpp
Code:

this->ChannelMessageReceived(8, 0, 100, response);

Akkadius 05-04-2010 11:37 AM

I don't know what to say then, I will probably continue to use those 3 lines until it stops crashing the zones when not targeted.


All times are GMT -4. The time now is 01:13 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.