L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 14, 2008, 10:41:27 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: How to get bot to ignore certain syntax in the relay module.
Pages: [1]   Go Down
« previous next »
Print
Author Topic: How to get bot to ignore certain syntax in the relay module.  (Read 292 times)
0 Members and 1 Guest are viewing this topic.
Diablo
Rookie
**
Offline Offline

Posts: 67


How to get bot to ignore certain syntax in the relay module.
« on: March 01, 2008, 01:31:55 AM »

I am needing some help on how to change the relay module so that certain syntax like @ when set wont be relayed to other bots but only shows in the main org bot that it was typed in. I tried putting preg_match in so it wouldnt send the gcr out in front of message would this be best way to do this.
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 784



WWW
Re: How to get bot to ignore certain syntax in the relay module.
« Reply #1 on: March 01, 2008, 02:18:07 PM »

a better way would be
Code:
If($msg[0] == "@")
{
   Return;
}
Prob at top of the function that handles none commands.

You should also use settings so you can easily change it instead of it being coded as@
Logged
Diablo
Rookie
**
Offline Offline

Posts: 67


Re: How to get bot to ignore certain syntax in the relay module.
« Reply #2 on: March 01, 2008, 10:16:43 PM »

i tried this code but not exactly sure where best place to put in the relay_guild module.
This should check another module for Syntax and if its there should not realy the chat.

Code:
if (preg_match("/^" . $this -> bot -> settings -> get ('HRelay1', 'nearSyntax') . " (.+)/i", $msg))
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: How to get bot to ignore certain syntax in the relay module.
« previous next »
 
Jump to:  

Recent
Buddylist for guildbot
by Zacix
[Today at 09:43:40 AM]

Link 2 Guilds via 2 Bots?
by Temar
[Today at 08:42:11 AM]

OnlineOrg
by Karsta
[October 13, 2008, 06:54:20 AM]

!security Levels
by Nytridr
[October 12, 2008, 11:36:45 PM]

Bossloot for 5.2
by Brac
[October 12, 2008, 04:45:17 PM]

Ported Modules
by Jiheld
[October 12, 2008, 09:00:13 AM]

raid/point system suggest...
by Temar
[October 11, 2008, 11:45:40 PM]

!timers suggestions: alts...
by Alreadythere
[October 11, 2008, 03:19:46 PM]

!server does not work
by Alreadythere
[October 11, 2008, 06:54:38 AM]

TWC
by clashbot
[October 10, 2008, 08:52:57 AM]
Stats
Members
Total Members: 989
Latest: Syphae
Stats
Total Posts: 10814
Total Topics: 1459
Online Today: 14
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 15
Total: 17
Zacix

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.727 seconds with 28 queries. (Pretty URLs adds 0.03s, 4q)
Loading...