collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Always post news 0.4.1  (Read 2152 times)

0 Members and 1 Guest are viewing this topic.

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Always post news 0.4.1
« 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
« Last Edit: September 02, 2007, 09:33:19 pm by Aesgaard »
-*tinkers*-

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Always post news 0.4.1
« Reply #1 on: September 03, 2007, 11:58:48 am »
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.

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: Always post news 0.4.1
« Reply #2 on: September 03, 2007, 02:43:04 pm »
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
-*tinkers*-

Offline kuznechik

  • Contributor
  • *******
  • Posts: 60
  • Karma: +0/-0
Re: Always post news 0.4.1
« Reply #3 on: September 03, 2007, 06:12:36 pm »
Code: [Select]
--- 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.
Kuznechik, proud bot admin of Disciples of Omni-Tek, Rimor.

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: Always post news 0.4.1
« Reply #4 on: September 04, 2007, 02:51:51 pm »
I should modify logon spam to "true" ? :P
-*tinkers*-

Offline kuznechik

  • Contributor
  • *******
  • Posts: 60
  • Karma: +0/-0
Re: Always post news 0.4.1
« Reply #5 on: September 05, 2007, 11:39:10 am »
If you turn logon spam to "true" - it'll be giving link with news to players upon logon. But not the headlines/news itself.
Kuznechik, proud bot admin of Disciples of Omni-Tek, Rimor.

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 690
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal