Application module

If you have created a 3rd party module you'd like other people to use, post it here
Arbor
Member
Posts: 7
Joined: Fri Feb 09, 2018 9:21 pm

Re: Application module

Postby Arbor » Sun Feb 11, 2018 5:00 am

Having an issue with this module that is bugging me. I managed to update it to new BudaBot standards (camel case).

Alright, onto what's bugging me now.

Background: Had existing bots (in relay) that had been running for some time. Migrated the database to MySQL to prevent issues with bots being locked out of database. Setup AOChatProxy preemptively. I begin working on the application module (on a non-live bot) to get it all fixed up for latest budabot release. All is well, all functions working appropriately (as far as I can tell). However, when the bot starts up I get a message that says no handler found for the 'applist' command. However, there is a handler for it... Even better, I can use the command just fine. Any ideas?



*Edit* Found the problem. There are two controllers for this module. Both files have the command defined, but obviously the function only exists once. Simply remove the definition from the RecruitersController.class.php

*Edit 2* Also found that mysql doesn't like the descriptions from this mod for events and configs because they go over the 75 character limit. I did end up sorting this out by changing the length of the description field in the tables.
Arbor
Member
Posts: 7
Joined: Fri Feb 09, 2018 9:21 pm

Re: Application module

Postby Arbor » Sun Feb 11, 2018 10:42 pm

Yet another issue. After I got the application module working on the test bot (using Sqlite), I copied the module to the live bots on mysql and found out that they don't use the same syntax. Getting SQL errors now. It's proving to be a pain for me to fix given that I know very little of MySQL and SQLite syntax, let alone how they differ.
Tyrence
Posts: 2007
Joined: Sat Jan 09, 2010 1:32 am

Re: Application module

Postby Tyrence » Mon Feb 12, 2018 4:25 am

Regarding the 75-character limit, the idea behind that is that people would use succinct descriptions. But since most people develop on SQLite and SQLite doesn't respect size limits for text fields, the intended effect was not achieved.

You should post the version you are using with the changes for Budabot 3.5 in case other people would like to use it and aren't using MySQL. Also, if you post the errors you are seeing the logs and the relevant SQL that is failing, someone might be able to help you solve those issues.
"Those who expect to reap the blessings of freedom, must, like men, undergo the fatigues of supporting it." — Thomas Paine
"Nearly all men stand adversity, but if you want to test a man's character, give him power." — Abraham Lincoln
Budabot Releases and Downloads: https://github.com/Budabot/Budabot/releases
Arbor
Member
Posts: 7
Joined: Fri Feb 09, 2018 9:21 pm

Re: Application module

Postby Arbor » Tue Feb 13, 2018 7:07 pm

I will definitely post when I have it up-to-snuff. I reverted the changes to the database and decided to alter the descriptions to stay within the confined limits of 75 characters.
Still not finished making the SQL statements MySQL-friendly.

Is there a way to send a chatCmd directly to a person via tell? I see that messages in tells can link to blobs and blobs can have chatCmds, but when I do...

Code: Select all

$appLink = $this->text->makeChatcmd("here", "/tell <myname> appstatus");
$this->chatBot->sendTell($msg, $player);



The message goes through to the player. The text is highlighted as if it's a link, but clicking on it does nothing.
Tyrence
Posts: 2007
Joined: Sat Jan 09, 2010 1:32 am

Re: Application module

Postby Tyrence » Tue Feb 13, 2018 7:59 pm

Yeah, you can't do that, you have to wrap it inside a blob. AO requires that all chat commands are inside of blob windows.
"Those who expect to reap the blessings of freedom, must, like men, undergo the fatigues of supporting it." — Thomas Paine
"Nearly all men stand adversity, but if you want to test a man's character, give him power." — Abraham Lincoln
Budabot Releases and Downloads: https://github.com/Budabot/Budabot/releases
Arbor
Member
Posts: 7
Joined: Fri Feb 09, 2018 9:21 pm

Re: Application module

Postby Arbor » Thu Feb 15, 2018 12:57 am

Ok, so no worries there. Should be able to simply link directly to the appstatus as a function instead of calling it as a chat command.

Return to “Modules”

Who is online

Users browsing this forum: No registered users and 1 guest