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: prefix for relaying  (Read 2688 times)

0 Members and 1 Guest are viewing this topic.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
prefix for relaying
« on: August 31, 2007, 10:16:20 am »
would like to see the ability to turn on/off using prefix's to relay over the relay bot.  and able to define what the prefix will be..

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

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: prefix for relaying
« Reply #1 on: September 03, 2007, 08:50:55 pm »
Which prefix do you want to have optional and definable? The !gcr in front of each line relayed?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: prefix for relaying
« Reply #2 on: September 03, 2007, 11:05:38 pm »
i dont see why any 1 would want to turn off or change !grc is for bot use only

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: prefix for relaying
« Reply #3 on: September 03, 2007, 11:40:38 pm »
One reason would be the bots using different command prefixes.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: prefix for relaying
« Reply #4 on: September 03, 2007, 11:50:54 pm »
I am not talking about the !gcr command..

okay your talking in org chat.. and if you have a prefix set up.. then anything you say would stay in org chat instead of being relayed.

So say you want to say something to the rest of the group you would put
@hello everyone hows eveyrone doing?

Everyone would get the above message across the linked bots..
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: prefix for relaying
« Reply #5 on: September 04, 2007, 12:08:49 am »
Should that command be instead of relaying all chat over the bots?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: prefix for relaying
« Reply #6 on: September 04, 2007, 01:48:42 am »
yer he mean only relay when prefix @ or wateva is at beginning

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: prefix for relaying
« Reply #7 on: September 04, 2007, 02:49:31 am »
Should that command be instead of relaying all chat over the bots?

have it where it can be set either way..in the settings..   and be able to shut it on and off..

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

Offline Pharexys

  • BeBot Apprentice
  • ***
  • Posts: 117
  • Karma: +0/-0
Re: prefix for relaying
« Reply #8 on: October 03, 2007, 03:52:38 pm »
Nyth you got this prefix working yet? im loking for it atm too

Offline Nogoal

  • BeBot Apprentice
  • ***
  • Posts: 77
  • Karma: +0/-0
Re: prefix for relaying
« Reply #9 on: October 04, 2007, 10:14:05 am »
You can make your own script without using the relay module. Something like

Code: [Select]
<?php

$prerelay 
= new prerelay($bot);

$commands["gc"]["r"] = &$prerelay;
$commands["tell"]["pr"] = &$prerelay;


/*
The Class itself...
*/
class prerelay
{
var $bot;




/*
Constructor:
Hands over a reference to the "Bot" class.
*/
function prerelay (&$bot)
{
$this -> bot = &$bot;

$this -> bot -> accesscontrol -> create('tell''pr''LEADER');

$this -> help['description'] = "Plugin to enable communication between 2 org bots without using relay";
}



/*
This gets called on a tell with the command
*/
function tell($name$msg)
{
if (preg_match("/^" $this -> bot -> commpre "pr (.+)$/im"$msg$info))
{
$this -> bot -> send_gc($info[1]);

}
}

/*
This gets called on a msg in the guildchat with the command
*/
function gc($name$msg)
{
if ((preg_match("/^" $this -> bot -> commpre "r (.+)$/im"$msg$info))

{

$this -> bot -> send_tell(Botname_from_other_org,"<pre>pr [<botname>]".$name.": ".$info[1], 0false);
}
}




}
?>

Add bots as leader and !r blahblah should return [Botame]Nogoal: blahblah

Offline Pharexys

  • BeBot Apprentice
  • ***
  • Posts: 117
  • Karma: +0/-0
Re: prefix for relaying
« Reply #10 on: October 11, 2007, 10:26:51 am »
I made it with database.

* Put Alliance1.php and Bot.php in your /custom/modules/
* Does not work if you run 2 bots on same database, fast fix is to change name of database to one of bots. Exemple from bots to bots1.
* As said by Nogoal, you need add bots to Leader Group.
Commands:
[tell] !bot <botname> - Adds <botname to database.
[tell] !botlist - Shows all Bots and theyr Organization.
[tell] !botremove <botname> - Removes <botname from database.
[GC] !r <msg> - To chat with Allied Guilds.

TO DO:
* Couldnt get the show of Guilds to work properly, it shows the guild name it sends msg too at this moment.

Fixes:
*Got the Guild name showing and removed the add of guildname needed. Made it automatly :D
*Fixed a typo that made bot restart.

PLEASE REDOWNLOAD IT AND IF YOU ALREADY ADDED BOTS TO DATABASE, REMOVE THEM WITH !Botremove, and Re-add them with the new command, !bot <botname>.



« Last Edit: October 11, 2007, 11:48:18 am by Pharexys »

 

* 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: 785
  • 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