Jump to content

antiroot

Members
  • Posts

    302
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by antiroot

  1. I just merged the master into my local new_ahbot and cleaned up the conflicts as this, seems to be working for me

    diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
    index 1ed2536..99d1697 100644
    --- a/src/game/Mail.cpp
    +++ b/src/game/Mail.cpp
    @@ -874,10 +874,10 @@ MailDraft& MailDraft::AddItem( Item* item )
    /**
     * Prepares the items in a MailDraft.
     */
    -void MailDraft::prepareItems(Player* receiver)
    +bool MailDraft::prepareItems(Player* receiver)
    {
        if (!m_mailTemplateId || !m_mailTemplateItemsNeed)
    -        return;
    +        return false;
    
        m_mailTemplateItemsNeed = false;
    
    @@ -898,6 +898,8 @@ void MailDraft::prepareItems(Player* receiver)
                }
            }
        }
    +
    +    return true;
    }
    /**
     * Deletes the items included in a MailDraft.
    @@ -1006,17 +1008,22 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
    {
        Player* pReceiver = receiver.GetPlayer();               // can be NULL
    
    +    bool has_items = !m_items.empty();
    +
        if (receiver.GetPlayerGuid() == auctionbot.GetAHBObjectGuid())
        {
    -        if (sender.GetMailMessageType() == MAIL_AUCTION && !m_items.empty())
    +        if (sender.GetMailMessageType() == MAIL_AUCTION && has_items)
                deleteIncludedItems(true);
    
            return;
        }
    
    +    // generate mail template items for online player, for offline player items will generated at open
        if (pReceiver)
    -        prepareItems(pReceiver);                            // generate mail template items
    -
    +    {
    +        if (prepareItems(pReceiver))
    +            has_items = true;
    +    }
    
        uint32 mailId = sObjectMgr.GenerateMailID();
    
    @@ -1042,7 +1049,7 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
        CharacterDatabase.BeginTransaction();
        CharacterDatabase.PExecute("INSERT INTO mail (id,messageType,stationery,mailTemplateId,sender,receiver,subject,body,has_items,expire_time,deliver_time,money,cod,checked) "
            "VALUES
    ('%u', '%u', '%u', '%u', '%u', '%u', '%s', '%s', '%u', '" UI64FMTD "','" UI64FMTD "', '%u', '%u', '%u')",
    -        mailId, sender.GetMailMessageType(), sender.GetStationery(), GetMailTemplateId(), sender.GetSenderId(), receiver.GetPlayerGuid().GetCounter(), safe_subject.c_str(), safe_body.c_str(), (m_items.empty() ? 0 : 1), (uint64)expire_time, (uint64)deliver_time, m_money, m_COD, checked);
    +        mailId, sender.GetMailMessageType(), sender.GetStationery(), GetMailTemplateId(), sender.GetSenderId(), receiver.GetPlayerGuid().GetCounter(), safe_subject.c_str(), safe_body.c_str(), (has_items ? 1 : 0), (uint64)expire_time, (uint64)deliver_time, m_money, m_COD, checked);
    
        for(MailItemMap::const_iterator mailItemIter = m_items.begin(); mailItemIter != m_items.end(); ++mailItemIter)
        {
    @@ -1091,4 +1098,48 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
        else if (!m_items.empty())
            deleteIncludedItems();
    }
    +
    +/**
    + * Generate items from template at mails loading (this happens when mail with mail template items send in time when receiver has been offline)
    + *
    + * @param receiver             reciver of mail
    + */
    +
    +void Mail::prepareTemplateItems( Player* receiver )
    +{
    +    if (!mailTemplateId || !items.empty())
    +        return;
    +
    +    has_items = true;
    +
    +    Loot mailLoot;
    +
    +    // can be empty
    +    mailLoot.FillLoot(mailTemplateId, LootTemplates_Mail, receiver, true, true);
    +
    +    CharacterDatabase.BeginTransaction();
    +    CharacterDatabase.PExecute("UPDATE mail SET has_items = 1 WHERE id = %u", messageID);
    +
    +    uint32 max_slot = mailLoot.GetMaxSlotInLootFor(receiver);
    +    for(uint32 i = 0; items.size() < MAX_MAIL_ITEMS && i < max_slot; ++i)
    +    {
    +        if (LootItem* lootitem = mailLoot.LootItemInSlot(i, receiver))
    +        {
    +            if (Item* item = Item::CreateItem(lootitem->itemid, lootitem->count, receiver))
    +            {
    +                item->SaveToDB();
    +
    +                AddItem(item->GetGUIDLow(), item->GetEntry());
    +
    +                receiver->AddMItem(item);
    +
    +                CharacterDatabase.PExecute("INSERT INTO mail_items (mail_id,item_guid,item_template,receiver) VALUES
    ('%u', '%u', '%u','%u')",
    +                    messageID, item->GetGUIDLow(), item->GetEntry(), receiver->GetGUIDLow());
    +            }
    +        }
    +    }
    +
    +    CharacterDatabase.CommitTransaction();
    +}
    +
    /*! @} */
    

    Note i changed the lines

    - if (sender.GetMailMessageType() == MAIL_AUCTION && !m_items.empty())

    + if (sender.GetMailMessageType() == MAIL_AUCTION && has_items)

    because of the implementation of the new bool variable has_items

  2. your ahbot conf file should be named ahbot.conf and should also be in the same directory as your other mangos conf files

    Once the file is named correctly and in the correct directory, a server restart or .ahbot reload should fix it

    for your other question this has been asked many times that i've seen, but simply the console/gm command .help is the best tool to figure out how to use the commands. I should note however that you said you tried the add item command without success, this command only works in game and its syntax is

    .additem <item_id>

    you obtain the item id with .lookup item <item_name> (can be used from console)

    another way to send items is by mail which can be done through the console, see

    .help send items (i don't remember the syntax for the send items command at the moment)

  3. I don't personally use sqlyog, but i don't believe it is part of mysql, it's a 3rd party program you'll have have to download and install separately. google sqlyog and it is the first result

    Edit: The parts of the guide that tell you use sqlyog can also be done from the mysql client itself (the console screen with mysql>) sqlyog just gives a nice gui interface which is a little easier to work with for most users

  4. I don't think Microsoft SQL Server is conflicting it listens on tcp port 1433 i believe, and MySQL listens on tcp port 3306

    But you can double check using this to see if anything is listening on port 3306

    netstat -an | find "LISTENING"

    It looks like the configuration wizard doesn't function correctly when it attempts to add new users

    http://bugs.mysql.com/bug.php?id=59038

    it's a very English heavy bug report, basically windows 7 users are having this error when they configure the mysql install in strict mode. The field authentication_string is NOT NULL but the wizard attempt to insert NULL which causes an error

    the work around in the report is

    A work around is to stop the configuration wizard when it bombs, go in and mark the

    mysql.user.authentication_string column as nullable, then re-run the configuration

    wizard, which will then complete normally and successfully "apply security settings."

    Edit: Although I've not installed mysql on windows in a while, I wonder if you could just tell it not to add any users at all (root is already there of course) then it wouldn't need to insert any users

  5. Not sure where patch suggestions should go for AHBot so i hope this is ok

    I happened to come across this while adding a bunch of fine tuning filter/restrictions to my implementation of ahbot

    in ahbot.conf

    AuctionHouseBot.Items.ReqSkill.*

    Prevent seller from listing items below/above this skill level

    but in code its checking

    prototype->RequiredSkill

    ItemPrototype.h says "uint32 RequiredSkill; // id from SkillLine.dbc"

    I think it should be more like

    diff --git a/src/game/AuctionHouseBot/AuctionHouseBot.cpp b/src/game/AuctionHouseBot/AuctionHouseBot.cpp
    index ac18504..0c9c68f 100644
    --- a/src/game/AuctionHouseBot/AuctionHouseBot.cpp
    +++ b/src/game/AuctionHouseBot/AuctionHouseBot.cpp
    @@ -845,21 +845,21 @@ bool AHB_Seller::Initialize()
                if ((!isLootItem) && (!isVendorItem))
                    continue;
            }
    -        if ((prototype->Class==ITEM_CLASS_ARMOR)||(prototype->Class==ITEM_CLASS_WEAPON)||(prototype->Class==ITEM_CLASS_ARMOR))
    +        if ((prototype->Class==ITEM_CLASS_ARMOR)||(prototype->Class==ITEM_CLASS_WEAPON))
            {
                if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_ITEM_LEVEL)) > 0) && (prototype->ItemLevel < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_ITEM_LEVEL))) continue;
                if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_ITEM_LEVEL)) > 0) && (prototype->ItemLevel > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_ITEM_LEVEL))) continue;
                if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_REQ_LEVEL)) > 0) && (prototype->RequiredLevel < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_REQ_LEVEL))) continue;
                if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_REQ_LEVEL)) > 0) && (prototype->RequiredLevel > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_REQ_LEVEL))) continue;
    -            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK)) > 0) && (prototype->RequiredSkill < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK))) continue;
    -            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK)) > 0) && (prototype->RequiredSkill > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK))) continue;
    +            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK)) > 0) && (prototype->RequiredSkillRank < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK))) continue;
    +            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK)) > 0) && (prototype->RequiredSkillRank > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK))) continue;
            }
            if ((prototype->Class==ITEM_CLASS_RECIPE)||(prototype->Class==ITEM_CLASS_CONSUMABLE)||(prototype->Class==ITEM_CLASS_PROJECTILE))
            {
                if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_REQ_LEVEL)) > 0) && (prototype->RequiredLevel < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_REQ_LEVEL))) continue;
                if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_REQ_LEVEL)) > 0) && (prototype->RequiredLevel > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_REQ_LEVEL))) continue;
    -            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK)) > 0) && (prototype->RequiredSkill < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK))) continue;
    -            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK)) > 0) && (prototype->RequiredSkill > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK))) continue;
    +            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK)) > 0) && (prototype->RequiredSkillRank < sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK))) continue;
    +            if (((sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK)) > 0) && (prototype->RequiredSkillRank > sAHB_BaseConfig.getConfig(CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK))) continue;
            }
            if ((prototype->Class==ITEM_CLASS_MISC) && (prototype->Flags == 4))
            {
    @@ -1565,4 +1565,4 @@ void AuctionHouseBot::Update()
            }
            if (m_OperationSelector >= 5) m_OperationSelector=0; else ++m_OperationSelector;
        }
    -}
    \\ No newline at end of file
    +}

  6. Thanks a lot both lynx3d and vladimir

    adding the -rdynamic flag resolved the issue

    diff --git a/src/mangosd/CMakeLists.txt b/src/mangosd/CMakeLists.txt
    index 074b692..2966707 100644
    --- a/src/mangosd/CMakeLists.txt
    +++ b/src/mangosd/CMakeLists.txt
    @@ -77,7 +77,7 @@ endif()
    set(EXECUTABLE_LINK_FLAGS "")
    
    if(UNIX)
    -  set(EXECUTABLE_LINK_FLAGS "-pthread ${EXECUTABLE_LINK_FLAGS}")
    +  set(EXECUTABLE_LINK_FLAGS "-pthread ${EXECUTABLE_LINK_FLAGS} -rdynamic")
    endif()
    
    if(APPLE)

    in case metacero or any other freebsd users need to know exactly where the change was made

    .server info

    Using script library: ScriptDev2 (for MaNGOS 11167+) Revision [37d02ac88add5c131db7230055ad57a5b7a287ba] * * (Unix)

    just ran through some areas that i know were sd2 scripted and everything is running correctly

  7. Added dlerror call after MANGOS_LOAD_LIBRARY

    This is with SD2

    2011-02-22 14:20:21 ERROR:ACE_OS::dlerror() -  /opt/mangos/lib/libmangosscript.so: Undefined symbol "_ZN10CreatureAI12CanCastSpellEP4UnitPK10SpellEntryb".
    

    Edit:

    without SD2

    2011-02-22 15:07:12 ERROR:ACE_OS::dlerror() -  Shared object "libmangosscript.so" not found, required by "mangosd".

    after looking at bindings/CMakeLists.txt i noticed that "add_subdirectory(universal)" is commented out so this would explain why its not found when compiling without SD2

    So to me this looks like its an SD2 issue and i should post over there after a little more research

    it looks to me like CreatureAI isn't being included/linked into mangosscript correctly, but I'm not sure where exactly the problem is, just looks like SD2 problem to me but i could be wrong

  8. same here, library still is not seen

    compiled in DEBUG, and installed gdb on server and was able to get this much

    Breakpoint 2, World::SetInitialWorldSettings (this=0x28ee3200) at /root/mangos/src/game/World.cpp:1262
    1262        switch(sScriptMgr.LoadScriptLibrary(MANGOS_SCRIPT_NAME))
    (gdb) step
    MaNGOS::Singleton<ScriptMgr, MaNGOS::SingleThreaded<ScriptMgr>, MaNGOS::OperatorNew<ScriptMgr>, MaNGOS::ObjectLifeTime<ScriptMgr> >::Instance ()
       at /root/mangos/src/framework/Policies/SingletonImp.h:36
    36          if (!si_instance)
    (gdb)
    54          return *si_instance;
    (gdb)
    
    
    ScriptMgr::LoadScriptLibrary (this=0x28e84a40, libName=0x8637837 "mangosscript") at /root/mangos/src/game/ScriptMgr.cpp:1049
    1049        UnloadScriptLibrary();
    (gdb)
    ScriptMgr::UnloadScriptLibrary (this=0x28e84a40) at /root/mangos/src/game/ScriptMgr.cpp:1113
    1113        if (!m_hScriptLib)
    (gdb)
    1150    }
    (gdb)
    ScriptMgr::LoadScriptLibrary (this=0x28e84a40, libName=0x8637837 "mangosscript") at /root/mangos/src/game/ScriptMgr.cpp:1051
    1051        std::string name = libName;
    (gdb)
    1052        name = MANGOS_SCRIPT_PREFIX + name + MANGOS_SCRIPT_SUFFIX;
    (gdb)
    std::operator+<char, std::char_traits<char>, std::allocator<char> > (__lhs=0x8624d50 "lib", __rhs=...) at /usr/include/c++/4.2/bits/basic_string.tcc:680
    680           const __size_type __len = _Traits::length(__lhs);
    (gdb)
    std::char_traits<char>::length (__s=0x8624d50 "lib") at /usr/include/c++/4.2/bits/char_traits.h:258
    258           { return strlen(__s); }
    (gdb)
    std::operator+<char, std::char_traits<char>, std::allocator<char> > (__lhs=0x8624d50 "lib", __rhs=...) at /usr/include/c++/4.2/bits/basic_string.tcc:681
    681           __string_type __str;
    (gdb)
    682           __str.reserve(__len + __rhs.size());
    (gdb)
    683           __str.append(__lhs, __len);
    (gdb)
    684           __str.append(__rhs);
    (gdb)
    std::operator+<char, std::char_traits<char>, std::allocator<char> > (__lhs=..., __rhs=0x8624d54 ".so") at /usr/include/c++/4.2/bits/basic_string.h:2111
    2111          basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
    (gdb)
    2112          __str.append(__rhs);
    (gdb)
    ScriptMgr::LoadScriptLibrary (this=0x28e84a40, libName=0x8637837 "mangosscript") at /root/mangos/src/game/ScriptMgr.cpp:1054
    1054        m_hScriptLib = MANGOS_LOAD_LIBRARY(name.c_str());
    (gdb)
    ACE_OS::dlopen (fname=0x3978a4dc "libmangosscript.so", mode=257) at /usr/local/include/ace/OS_NS_dlfcn.inl:124
    124       ACE_OSCALL
    (gdb)
    144       return handle;
    (gdb)
    189     }
    (gdb)
    ScriptMgr::LoadScriptLibrary (this=0x28e84a40, libName=0x8637837 "mangosscript") at /root/mangos/src/game/ScriptMgr.cpp:1056
    1056        if (!m_hScriptLib)
    (gdb)
    1057            return SCRIPT_LOAD_ERR_NOT_FOUND;
    (gdb)
    1109    }
    (gdb)
    World::SetInitialWorldSettings (this=0x28ee3200) at /root/mangos/src/game/World.cpp:1268
    1268                sLog.outError("Scripting library not found or not accessible.");

    Edited: @ 124 ACE_OSCALL, gdb appeared to be unresponsive and was using 25% cpu, i thought it halted but after posting this it continued seconds later. All i can conclude from this is at least the library name is correct "libmangosscript.so" but I'm thinking ACE_OS::dlopen is not being friendly with freebsd

  9. When i do test install mangos at FreeBSD i see in install log:
    -- Set runtime path of "*/mangos/lib/libmangosscript.so" to "*/mangos/lib"

    Maybe you not have at mangos build proper install dir as path where mangos will executed?

    I saw that log also

    however doing elfdump like Lynx3d suggested shows

    elfdump -d /opt/mangos/bin/mangosd

    entry: 12

    d_tag: DT_RPATH

    d_val: /opt/mangos/lib:/usr/local/lib:/usr/local/lib/mysql

    elfdump -d /opt/mangos/lib/libmangosscript.so

    entry: 6

    d_tag: DT_RPATH

    d_val: /opt/mangos/lib

    Edit:

    Also i built it using these exact steps.. all patches, sd2 removed since this issue occurred for me with clean mangos

    git clone git://github.com/mangos/mangos.git ~/mangos
    cd ~/mangos
    mkdir objdir
    cmake ../ -DACE_USE_EXTERNAL=1 -DPREFIX=/opt/mangos/
    make
    make install
    make clean

    Another Edit:

    just tried adding /opt/mangos/lib/ to ldconfig still no change

  10. Finally got around to building the latest revision with cmake and after some slight tweaking with 3rd party patches was able to get most of everything working, however the scripting library cannot be loaded/found by mangosd

    Note about sysem

    32-Bit FreeBSD 7.2

    using external ACE-6.0.0, compiled with default configurations (bundled will not compile under freebsd)

    I receive the following in my logs

    2011-02-20 18:14:26 Initializing Scripts...
    2011-02-20 18:14:26 ERROR:Scripting library not found or not accessible.

    I thought maybe one of my patches were at fault so I disabled all custom patches, still got the error. Disabled SD2 and compiled with generic scripting library and still got the error

    So far I'm sure about the following

    Its a not a permissions issue, everything is owned by the same user that mangosd runs as

    The file does exist, and is not empty (assuming that it has the correct name)

    libmangosscript.so is compiled to mangos/lib/ but

    ldd mangos/bin/mangosd

    does not say that mangosd is linked to the library at all, all other builds prior to using cmake would have a listing for libmysqlscript.so.0

    any ideas would be appreciated thanks

  11. Nice idea for a thread.

    Typically with the servers I maintain they need to be accessible by our customers, which means trying to block proxies could potentially block legitimate customers as well

    We spend a large amount of time just making sure we have secure passwords on anything that needs them, limit which users are actually allowed to login (this means disabling root login and other system users)

    SSH logins are only allowed by key based authentication

    Firewall setup to allow only specific hosts we define are allowed to connect directly to MySQL, customers have no need to connect to the DB directly since the webserver is the frontend to the DB

    One thing i've been working on lately to counter attack MySQL injection attacks is validating the data before it goes through to mysql

    for example we have some pages that use a GET variable which should always be numeric and no more than 6 digits, so in code we check that this is the case if its not then we reject the request altogether (some places this isn't as easy, like a website search feature)

    Edit: This is more to prevent load on the database than to be a security measure, but if a malicious person is doing DDOS on you then you'd still want to limit what resources they can consume

    oh and of course don't forget mysql_real_escape_string.. any time there is a place where the user is able to input ANY type of data, make sure to validate/clean/escape

    and in the event that you don't escape user input data, make sure apache/webserver is not allowed to write to anything other than say /tmp/, otherwise a script kiddie could find a spot where they could upload code that gets eval'd and then they can alter/delete/add anything they want to your server

    These are most of the ideas i could think of in 5 minutes, hope they are useful to someone

  12. I'd like to tryout this project finally, only 2 questions first.

    1) Are the instructions in Post #1 still relevant to install (ie: just do a git checkout.. no other patches or anything not mentioned)

    2) Is there a trusted repository or source that has binaries of the extractor (no i'm not lazy, just never had much luck compiling anything using MS visual/studio/express whatever software)

    Edit: going to attempt to compile it myself anyways, but just wanted to ask in case i can avoid the headache

    Edit Again: Ignore both questions, i was able to download the source and compile the windows binaries just fine. however when running MoveMapGen.exe alot of maps say that they are the wrong version and to extract new .map files, I just extracted the maps using the extractor source that was in the repository. Is this normal behavior? should I have used the precompiled extractor?

    thanks for the help, this looks like a very interesting project and i would like to test it out and provide some feedback about it

    Yet Another Edit: Just ignore this post altogether, after compiling the extractor i copied ad.exe to the install directory, didn't realized the compiler saved it as ad_debug.exe.. deleted ad.exe and copied ad_debug.exe over, all is working now

  13. <?php
    $db_host = "localhost";
    $db_user = "mangos";
    $db_pass = "password";
    mysql_connect($db_host,$db_user,$db_pass);
    mysql_select_db("realmd");
    $query = 'SELECT starttime,uptime,maxplayers FROM uptime ORDER BY maxplayers DESC LIMIT 1';
    $result = mysql_query($query);
    $row = mysql_fetch_array($result,MYSQL_ASSOC);
    
    echo "Record online: ".$row['maxplayers']." on " . date("Y-m-d H:i:s",$row['starttime']+$row['uptime']);
    ?>

    I threw this together very quickly so there is no type of error checking, but the php doesn't matter so much as the sql query is the part doing what you want. I also included the date of the record (starttime + uptime)

    Edit: although the date itself is not the time the record was reached but the date the server was started+how long its been up, i mainly included it just as an example of what can be done with the data

  14. I've seen this happen on my server a few times, but never easy to replicate and appeared to be random to me, just like characters loading to the same zone and their clothes are missing when they get in, or the client not knowing the characters correct height if they logged out and back in while mounted preventing them from entering some doorways

  15. Mangos Version: 11081

    Custom Patches: AHbot

    SD2 Version: 1959

    Database Name and Version : UDB 0.12.1 (397)

    How it SHOULD work:

    typing .server info should give full server build server (which works first time)

    How it DOES work:

    entering this command more than once is causing the script library portion to "repeat"

    its almost like when GetScriptLibraryVersion() is called from Level0.cpp Server Info command (line 107, i think it was) it is just appending more data to the pointer rather than over writing it

    Anyways after running .server info (more than twice) i receive something like this

    * The code box cuts of the interesting part, scroll to the right to see what i'm referring to

    MaNGOS/0.17.0 (* * Revision 11081 - f07f145b2920e368aae206cd5cd62a3c594c150c) for FreeBSD_x32 (little-endian)
    Using script library: ScriptDev2 (for MaNGOS 10950+) Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)Revision [1959] 2011-01-28 20:57:53 (Unix)
    Using World DB: UDB 0.12.1 (397) for MaNGOS 11064 with SD2 SQL for rev. 1953
    Using creature EventAI: ACID 3.0.8 - Full Release for Mangos (3.3.5a Client)
    Online players: 1 (max: 2) Queued players: 0 (max: 0)
    Server uptime: 2 Day(s) 3 Hour(s) 4 Minute(s) 26 Second(s).

    more of an annoyance than anything, but seems like a couldbe memory leak if a user/script were to spam the .server info command over and over

  16. The versions aren't stored directly in the field, but are the field name of the field where you would expect the version to be

    characters.character_db_version

    Field Name: required_10973_01_characters_game_event_status

    FIeld Value: NULL

    mangos.db_version

    Field Name: required_11058_01_mangos_spell_proc_event

    FIeld Value: NULL

    now that may not be the MaNGOS revision your running, but only the version of that database required for MaNGOS to run

    The actual current MaNGOS version is in ./src/shared/revision_nr.h, I don't believe it is ever stored in the database since the only way to update your version is by update/compile new sources not just updating database

  17. Thank soo much Ambal, works as expected now with default mysql configs.. I need to spend some time working with innodb and transactions, I really didn't have enough experience to quickly track down what was happening, now if this were myisam my years of experience with that would have been helpful.

    At any rate i believe this thread can be closed since the latest commit Ambal pushed resolve the problem

  18. correct i added "transaction-isolation = READ-COMMITTED" before making this report and it was working.

    however transaction-isolation = READ-COMMITTED is not a default mysql config, so in order to run mangos it requires you to reconfigure mysql in order for it to work

    Please, let me know if you'll be able to reproduce this issue again with default settings so I can take a look and help you. We are not interested in the fact that users have to change configs of their MySQL servers in order to keep up with the latest changes in the Core.

    From what Ambal said, i continued with this report because it does not work correctly for me with Default mysql confs, and requires reconfigure of non-mangos configurations

  19. ok updated mysql to newest version in freebsd ports tree

    both issues still present with default configs, so not a mysql bug (at least not one that has been reported and fixed if it is)

    max character dialogue occurs after these steps

    1) login, create 10 characters

    2) logout/close client

    3) restart mangos

    4) login, delete 1 characters

    5) create 1 character - max limit reached message here

    newly created characters can't be deleted

    1) login to account with less than 10 characters

    2) create character

    3) delete character (even after waiting 1 minute or more) - "Deleting Character" message hangs and never deletes character

  20. its a default config using my-medium.cf

    currently mysql 5.1.48, going to update to 5.1.54 to see if its a mysql bug and not mangos (hopefully this is the case, will report back after update)

    notes about server in case some how relevant

    freebsd 7.2 32bit, single core, 2gb ram

    mangos runs within a freebsd jail, mysql is installed in the same jail

    Edit: had same issue before using my-medium.cf config, using just mysql defaults and no my.cnf file

  21. well strangely it worked fine this time to create the player..

    however i still can't delete a character that was created since the running mangos process was started

    Pressing "Delete Character" from client, typing DELETE like it requires, and submitting just results in a hang, it is not frozen or crashed, just not processing anything about the delete.. this works fine for characters that were created before the current mangos process was started however

    EDIT: still had old instance of mysql running with non-default config, but didn't delete this post since Ambal already quoted me in a later post

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use