BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: Aesgaard on September 02, 2007, 09:31:36 pm
-
Is there a way to always show news to members when they log on ?
Oh, and I have a problem setting Headline, is there a command to make this ?
!headline gives /tell botname !help
-
headline has LEADER access per default, perhaps that's causing your problems.
About spamming on logon, check !settings news, logonspam should be what you want.
-
To [botname]: !settings news
[botname]: /tell botname !help
Owner access, tried with SA's too but I dont seem to get this to work lol
-
--- News.php.orig Tue Jul 31 16:36:26 2007
+++ News.php Fri Aug 17 20:37:48 2007
@@ -105,6 +105,7 @@
$this -> bot -> settings -> create ("News", "Raid_Add", "LEADER", "Who should be able to add raids", "ADMIN;LEADER;MEMBER;GUEST;ANONYMOUS");
$this -> bot -> settings -> create ("News", "Raid_Del", "LEADER", "Who should be able to delete raids", "ADMIN;LEADER;MEMBER;GUEST;ANONYMOUS");
$this -> bot -> settings -> create("News", "LogonSpam", FALSE, "Should the news be spammed to all buddies on their logon?");
+ $this -> bot -> settings -> create("News", "PrintLastHeadline", FALSE, "Should the last headline be shown out of blob?");
$this -> help['description'] = 'Sets and shows headlines, news and raid events.';
$this -> help['command']['news']="Shows current headlines and news";
@@ -216,6 +217,12 @@
{
$newsdate = gmdate($this -> bot -> settings -> get("Time", "FormatString"), $val[1]);
}
+ $result = $this -> bot -> db -> select("SELECT id, time, news FROM #___news WHERE type = '2' ORDER BY id DESC LIMIT 0, 1");
+ if (!empty($result))
+ foreach ($result as $val)
+ {
+ $lasthead = "<font color=CCInfoHeadline>" . $val[2] . "</font>";
+ }
$result_headline = $this -> bot -> db -> select("SELECT id, time, name, news FROM #___news WHERE type = '2' ORDER BY time DESC LIMIT 0, 3");
if (!empty($result_headline))
@@ -246,7 +253,11 @@
}
$inside .= "\n\n";
}
+ if ($this -> bot -> settings -> get("News", "PrintLastHeadline")) {
+ return $lasthead . ":: " . $this -> bot -> make_blob("click to view other news", $inside); }
+ else {
return "News last updated " . $newsdate . ":: " . $this -> bot -> make_blob("click to view", $inside);
+ }
}
/*
This is how I did that last headline is showed when some1 logs/do -news.
-
I should modify logon spam to "true" ? :P
-
If you turn logon spam to "true" - it'll be giving link with news to players upon logon. But not the headlines/news itself.