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

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

Author Topic: AutoMsg.php  (Read 31902 times)

0 Members and 1 Guest are viewing this topic.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
AutoMsg.php
« on: August 03, 2007, 12:54:10 am »
AutoMsg

This is Like a cross between !announce and !news

Wiki - Documentation/Help

Change Log

  • 18/07/07 - Added Alts Feature and Removed Bug were you had to have atleast 2 words in the msg
  • 20/07/07 - Fixed 2 Bugs (see topic)
  • 25/07/07 - Now useing cache for messages
  • 25/07/07 - Added a Check to see if Loging on or Off
  • 02/08/07 - Fixed Bug with Check All
  • 05/08/07 - Added Setting to Turn of Alt Checking
  • 05/08/07 - Added Time of Msg in Sending of message
  • 06/08/07 - Added Delay to send message after logon (changeable in settings)
  • 07/08/07 - Added Msg Number to Show Msgs
  • 07/08/07 - Added Edit Message
  • 07/08/07 - Fixed Bug with add slash not being removed when message gets sent
  • 08/08/07 - Changed to use Logon notify module
  • 08/08/07 - Changed blob to use colour themes
  • 10/08/07 - now cache on highest msg
  • 10/08/07 - Added few Checks to Stop Message Checks if lastmsg is the highest msg
  • 10/08/07 - Added Msg Blob so your message is in a blob instead (addb)
  • 11/08/07 - Fixed bug in Update_table
  • 02/09/07 - Fixed 2 Bugs posted
  • 05/09/07 - Added Edited Info
  • 20/09/07 - Added Make Message Interface
  • 20/09/07 - Added Expire
  • 24/09/07 - Fixed Edit
  • 24/09/07 - Fixed Display of no Expire
  • 23/11/07 - Merged 2 seperate Edited fields
  • 23/11/07 - Changed to Check and Update Lastmsg on Main Only
  • 23/11/07 - Added Option to Repeat Message every so often (on logon)
  • 23/11/07 - Added Show and Preview
  • 23/11/07 - Added Anti Bot Boot Spam (still sends if not seen before)
  • 23/11/07 - Fixed bug with sendlog
  • 25/11/07 - Fixed Bug with Preview and Added link to Interface
  • 25/11/07 - Fixed Prob Were the main character wasnt on the member list(he now gets added as userlevel 0)

Currently Doing
  • Adding Title for Blobs

Things to do
  • Add limits on who gets e.g. Org Rank/Bot Access Level

If you have Any ideas of What you would like this Module to do Please Post
« Last Edit: November 25, 2007, 01:28:25 am by Temar »

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #1 on: August 06, 2007, 04:03:21 am »
Made some Improvments (see top)

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #2 on: August 07, 2007, 01:40:23 am »
Added Ability to edit Messages, This will Change the Message for people who havn't yet seen original to see, People who have seen the original will not get the edited 1

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #3 on: August 08, 2007, 03:15:23 pm »
Made some Changes but Not fully Tested due to AO Server Move

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #4 on: August 10, 2007, 05:35:13 am »
Added use of blob for messages

!automsg addb message

this will add the message and send as normal but the message will be in a blob(which is the window you look at items in)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: AutoMsg.php
« Reply #5 on: September 02, 2007, 12:32:41 am »
maybe be able to send it to just ranks also..

!automsg SC msg..   This would send to SC, Gens, and Prez's
!automsg gens msg..   Gens and prez
!automsg rank msg..   Look up/\
!automsg all msg..   this would send to all reguardless of the rank.

also I am getting this error
Code: [Select]
Fatal error: Cannot use string offset as an array in C:\aobots\Bebot\custom\modu
les\automsg.php on line 96
« Last Edit: September 02, 2007, 12:58:06 am by Nytridr »
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #6 on: September 02, 2007, 03:58:20 am »
line 95 and 96
Code: [Select]
$highestmsg = $this -> bot -> db -> select("SELECT ID FROM #___automsgs ORDER BY ID DESC LIMIT 1", MYSQL_ASSOC);
$this -> highestmsg = $highestmsg[0][ID];
This is basicly getting list ording by ID desc
then getting the ID of the 1st entry so basicly geting highest
im not sure why you got that error

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #7 on: September 02, 2007, 04:08:40 am »
ah i think it maybe due to an empty table

try this
Code: [Select]
$highestmsg = $this -> bot -> db -> select("SELECT ID FROM #___automsgs ORDER BY ID DESC LIMIT 1", MYSQL_ASSOC);
if (!empty($highestmsg))
$this -> highestmsg = $highestmsg[0][ID];
else
$this -> highestmsg = 0;

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: AutoMsg.php
« Reply #8 on: September 02, 2007, 07:28:37 am »
That works, new problem..

Code: [Select]
rsbot [2007-09-02 05:45:35]     [TELL]  [INC]   Nytridra: !automsg add this is o
nly a test
MySQL error (# 0) on query: INSERT INTO rsbot_automsgs (type, added_by, added_at
, msg) VALUES ('text', 'Nytridra', 1188711935, 'this is only a test')
Unknown column 'type' in 'field list'
rsbot [2007-09-02 05:45:35]     [TELL]  [OUT]   -> Nytridra: Message Added as ID
 0 and Sent to Those Online.

and ofc this one..

Code: [Select]
rsbot [2007-09-02 06:00:42]     [TELL]  [INC]   Nytridra: !automsg addb Test
MySQL error (# 0) on query: INSERT INTO rsbot_automsgs (type, added_by, added_at
, msg) VALUES ('blob', 'Nytridra', 1188712842, 'Test')
Unknown column 'type' in 'field list'
rsbot [2007-09-02 06:00:42]     [TELL]  [OUT]   -> Nytridra: Message Added as ID
 0 and Sent to Those Online.
« Last Edit: September 02, 2007, 08:02:07 am by Nytridr »
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #9 on: September 02, 2007, 07:53:47 am »
yer im alerady aware of that prob
bug with make table field "type" isnt there
but is in the update table part im not sure why it doesnt work

Change it to this near top of file

Code: [Select]
$db -> query("CREATE TABLE IF NOT EXISTS ".$db -> define_tablename("automsgs", "true")." (
           ID INT NOT NULL auto_increment PRIMARY KEY,
   type VARCHAR(20) DEFAULT 'text' NOT NULL,
   added_by VARCHAR(30) default NULL,
   added_at INT NOT NULL default '0',
           msg TEXT
           )");

you can drop current table then let it make or add the field ur self

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: AutoMsg.php
« Reply #10 on: September 02, 2007, 08:06:27 am »
That fixed both problems.. look forward to the other updates..:)
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: AutoMsg.php
« Reply #11 on: September 02, 2007, 02:01:45 pm »
Fatal error: Cannot use string offset as an array in C:\Bebot0.4\modules\AutoMsg
.php on line 96

Please post fix'ed file and not fixes ? :D
-*tinkers*-

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AutoMsg.php
« Reply #12 on: September 02, 2007, 03:33:01 pm »
yer i didnt post changed file as i was already working on new stuff for it
will be posting some updates over the next day or 2

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: AutoMsg.php
« Reply #13 on: September 02, 2007, 03:58:53 pm »
Cool, it looks awesome but I have a tendency of messing stuff up even more when trying to fix it so I dont really dare trying hehe, cant wait to get it <3
-*tinkers*-

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: AutoMsg.php
« Reply #14 on: September 02, 2007, 06:44:41 pm »
Cool, it looks awesome but I have a tendency of messing stuff up even more when trying to fix it so I dont really dare trying hehe, cant wait to get it <3

Look up.. he posted the fix when I had the same problem

NVM..:)
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


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


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

* Who's Online
  • Dot Guests: 95
  • 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