BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: senare on June 16, 2006, 11:35:40 am

Title: admin interface ?
Post by: senare on June 16, 2006, 11:35:40 am
I am a bit new but have been tinckering with bebot as an org bot a bit and now i am considering the possibilities to give something back aswell :)

on the todo list there is a post about wish list admin interface, there also seams as the news module have been giving a recent owerhaul so it should be pretty much ctr-c ctrl-v, so if no one is working on that i give it a look this weekend ?

also i was thinking that some off those modules would benifit from having a webb interface as well (as a complement not a sudstitute), as well as some modules who could be accesible from the webb as well (news on the org homepage online status for members ...) dont most orgs keep a web page as it is ?

so i am wondering how this could be orginazied so thet it would be modular / reusable / and all that ...

/MVH "Senare"

 
Title: Re: admin interface ?
Post by: senare on June 16, 2006, 02:45:42 pm
oki to reply to my won post .. i am thinking that it might be possible to do it as a mod for phpbb phpbb  (http://www.phpbb.com/downloads.php) ? This would have to be a quite a big mod but still ?

such futures as accessing forums ingame aswell as html help files for commands to bot etc ?
as this would mostly come down to som would mostly require some translation/interpentation off bbcode ?

/MVH "Senare"

Title: Re: admin interface ?
Post by: Wolfbiter on June 16, 2006, 07:53:04 pm
I'm running the bot on the same shell as forums, so I wrote a phpbb script, every 6h it'll display new posts (with clickable links) on the last 12h.

Code: [Select]
<?
  /*
   * Something written by Wolfbiter
   */
   
$phpbb = new phpbb($bot);

$cron["6hour"][] = &$phpbb;

class phpbb {
var $bot;
var $url;
var $switch;
   
function phpbb (&$bot) {
$this -> bot = &$bot;
$this->url = "http://path/to/forum/viewtopic.php?t=";
$this->switch=0;
//Forum titles and their forum ID
$this->forums=Array(
"Applications"=>8,
"Bullshit"=>14,
"Lounge"=>9,
"Org Business"=>2,
"Q&A"=>11,
"Raids"=>10,
"Toons"=>13,
"Tower / Base"=>3
);
}
function cron() {
if (!$this->switch)
$this->switch++;
else {
//Loop for all the forums
foreach ($this->forums as $title => $id) {
$phpbb = $this->bot->db->select("SELECT topic_id,topic_title from phpbb_topics where topic_time>".(int)(time()-43200)." AND forum_id=".$id." order by topic_time");
if (!empty($phpbb)) {
$blob = count($phpbb)." topics in <font color=#cccc00>".$title."</font> the past 12 hours";
foreach ($phpbb as $post) {
if (count($phpbb) > 3)
$blob.= "<br>".$post[1]." :: ".$this->urlcmd($post[0],"click to view");
else
$blob.= "<br>".$post[1]." :: ".$this->bot->make_blob("click to view",$this->urlcmd($post[0],"click to view"));
}
if (count($phpbb) > 3)
$output = count($phpbb)." topics in <font color=#cccc00>".$title."</font> the past 12 hours :: ".$this->bot->make_blob($blob,"click to view");
else
$output = $blob;
$this->bot->send_gc($output);
}
}
}
}
function urlcmd($link, $title) {return '<a href=\'chatcmd:///start '.$this->url.$link.'\'>'.$title.'</a>';}
  }
?>
Title: Re: admin interface ?
Post by: senare on June 16, 2006, 10:01:38 pm
yeah ... i saw ya post about that in the thread about ingame forum wolfbiter, but its not really what i needed .. i am after some discussion about the admin interface for bebot ... would it be commonly used/develpoed for if i started some sort off webb interrface for configuring ones bot ...

Are there any thoughts towards a more or less graphical setup/install ?

Will all config options be keept in memory or in the database ?

And more stuff like that ?

and if so how would one go about making it possible to add admin options for each module?

if u still dont get what i am talking about ?

here is a example off how i mean that it could be ....

nubis noob have recently started an org so he whants a org homepage for his org and a ofcourse a bot ... he download and installs phpbb and bebot. then i snatalls the mod X for bebot ... then he opens up the amdin page in his browser and selects wich commands he whants in GC and wich he whants in tell, who shall have admin rights. And then he makes a few post on the forum about who gets to be in the elite squade for the org ... he also makes a news item syaing that the org now has been founded and has a forum ons some webbadress ... he also sets up the welcome msg to be a tell with !news from the bot (all this from the webb interface)

later when his org mates log in to the game they will be greated by a tell from bot with the !news  they will click on the link provide wich takes em to a webpage .. there is the forum and the is a help page for all the commands for the bot etc ...

or something like that ... now i dont intend to write all that although i prolly could get som off it started thats way i whanted a discussion on how one could write that in such a fashion that it would be extendeble, is that any clearer ?

/MVH "Senare"
Title: Re: admin interface ?
Post by: joey12344 on June 29, 2006, 07:04:22 pm
Anyone got one of these for Invision power board? Or invisionfree.com compatible particulary :) Thanks
SimplePortal 2.3.7 © 2008-2024, SimplePortal