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

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

Author Topic: Updated PrivGroup Module - Additional functionality  (Read 19387 times)

0 Members and 1 Guest are viewing this topic.

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #15 on: May 24, 2006, 04:55:37 am »
how do i make the !join free so they don't need to be on a guest list to join the guest channel?

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #16 on: May 27, 2006, 03:25:58 pm »
You will need to move the !join command handler from the tell() to tell2() function is the easiest way to explain that.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #17 on: July 28, 2006, 02:22:38 pm »
sorry havent hade much time to make it on the bot befor now.

but can you plz tell me where to make the tell2() because i can't find it :(

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #18 on: July 28, 2006, 05:04:34 pm »
Look in other modules...

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #19 on: July 28, 2006, 06:12:58 pm »
i have tryed that now and i only get my bot to restart and say something about a line 368 in bot.php

i'm not so good at php yet. but working on it all i can

Offline Tsuyoi

  • BeBot User
  • **
  • Posts: 30
  • Karma: +0/-0
  • BigT
    • Adrenaline Rush Forums
Re: Updated PrivGroup Module - Additional functionality
« Reply #20 on: July 28, 2006, 08:23:23 pm »
Changes to make to this module to get it working for everyone:

Find:
Code: [Select]
$privgroup = new PrivGroup($bot);

$commands['tell']['join'] = &$privgroup;
$commands['tell']['lock'] &$privgroup; <~~~~ Typo That Needs To Be Fixed
$commands['tell']['chat'] = &$privgroup;
$commands['tell']['leave'] = &$privgroup;
$commands['tell']['invite'] = &$privgroup;

After it Add:
Code: [Select]

$commands['tell2']['join'] = &$privgroup;

Then Find:
Code: [Select]
function tell($name, $msg) {
        if (preg_match('/^'.$this -> bot -> commpre.'invite *([^ ]+)*$/i', $msg, $info)) $c = !isset($info['1']) ? $this -> join($name) : $this -> invite($name, ucfirst($info['1']));
        else if (preg_match('/^'.$this -> bot -> commpre.'join$/i', $msg)) $c = $this -> join($name);
        $c != '' ? $this -> bot -> send_tell($name, $c) : NULL;
    }

And After Add:
Code: [Select]
function tell2($name, $msg) {
        if (preg_match('/^'.$this -> bot -> commpre.'join$/i', $msg)) $c = $this -> join($name);
        $c != '' ? $this -> bot -> send_tell($name, $c) : NULL;
    }

That should give you the results you're looking for.

Offline Tsuyoi

  • BeBot User
  • **
  • Posts: 30
  • Karma: +0/-0
  • BigT
    • Adrenaline Rush Forums
Re: Updated PrivGroup Module - Additional functionality
« Reply #21 on: July 28, 2006, 08:43:25 pm »
While I'm here tho, I was looking over the module and I noticed a few things that seemed alittle off to me.  I apologize if anything I list is as it was intended, so please feel free to correct me if I'm wrong on any of these.

Line 12:
Code: [Select]
$commands['tell']['lock'] &$privgroup;Should be:
Code: [Select]
$commands['tell']['lock'] = &$privgroup;


And on the /tell commands, it has listed that it reacts to 5 different commands via /tell, but only parses 2 of them.  So shouldn't the /tell function look more like:
Code: [Select]
function tell($name, $msg) {
        if (preg_match('/^'.$this -> bot -> commpre.'join$/i', $msg)) $c = $this -> join($name);
        else if (preg_match('/^'.$this -> bot -> commpre.'lock$/i', $msg)) $c = $this -> lock($name);
        else if (preg_match('/^'.$this -> bot -> commpre.'chat$/i', $msg)) $c = $this -> join($name);
        else if (preg_match('/^'.$this -> bot -> commpre.'leave$/i', $msg)) $c = $this -> leave($name);
        else if (preg_match('/^'.$this -> bot -> commpre.'invite *([^ ]+)*$/i', $msg, $info)) $c = !isset($info['1']) ? $this -> join($name) : $this -> invite($name, ucfirst($info['1']));
        $c != '' ? $this -> bot -> send_tell($name, $c) : NULL;
    }



And on the Join function:
Code: [Select]
    function join($name) {
        if(!$this -> bot -> commands['tell']['banlist'] -> bancheck($who)) {

Shouldn't it be:
Code: [Select]
    function join($name) {
        if(!$this -> bot -> commands['tell']['banlist'] -> bancheck($name)) {


If I'm wrong on any of those, I apologize, they just seemed alil off to me. :)

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #22 on: July 28, 2006, 09:18:08 pm »
Wow... no wonders I code stuff myself :p

There was a ton of typos/errors in that module... Tsuyoi found most of them :P
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #23 on: July 30, 2006, 11:43:26 am »
thx Tsuyoi

now we don't have to have a guest of honor every day. the fix i made did something to the bot so i just took some random people and put them on the bot  :-\

but it looks like you post helped me out there. so tyvm  :)

Offline Sammajos

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #24 on: October 08, 2006, 02:17:46 pm »
[Bot] MyChar: !facion all
[Bot] Bot: Invites changed to >All faction by >MyChar.
[Bot] MyChar: !faction exclude Clan
[Bot] Bot: Invites changed to >Clan faction by >MyChar.


Ok, dont know, what is wrong here. Im not a big Coder.

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #25 on: October 11, 2006, 12:09:00 am »
Quote
[Bot] MyChar: !facion all
[Bot] Bot: Invites changed to >All faction by >MyChar.
[Bot] MyChar: !faction exclude Clan
[Bot] Bot: Invites changed to >Clan faction by >MyChar.

the fast way to do it (don't know if it's the only way) is to change
find:
Quote
$this -> faction = 'Clan';
$this -> mode = 'include';
$this -> lock = 'disabled';
$this -> maxplayers = '200';

change it to:
Quote
$this -> faction = 'Clan';
$this -> mode = 'exclude';
$this -> lock = 'disabled';
$this -> maxplayers = '200';

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Updated PrivGroup Module - Additional functionality
« Reply #26 on: May 02, 2007, 02:07:13 am »
i get this error

Fatal error: Call to a member function on a non-object in (...site addy....)/modules/PrivGroup.php on line 170

Any 1 know why and how to fix or an alt module
main feature i like is the clan only invite thing as i run a bot for battle ship

the line in question reads

         $this -> user = $this -> bot -> whois -> lookup($name);

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Updated PrivGroup Module - Additional functionality
« Reply #27 on: May 02, 2007, 08:06:56 am »
You need the module here

-jj-

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Updated PrivGroup Module - Additional functionality
« Reply #28 on: May 02, 2007, 05:10:14 pm »
Works now thank you

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Re: Updated PrivGroup Module - Additional functionality
« Reply #29 on: May 21, 2007, 07:23:45 am »
I don't know if anyone is still getting anything from this thread, but fixed bugs posted by Tsuyoi
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


 

* Recent Posts
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 ]


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

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