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?
November 22, 2008, 12:47:05 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Updated PrivGroup Module - Additional functionality
Pages: 1 [2]   Go Down
« previous next »
Print
Author Topic: Updated PrivGroup Module - Additional functionality  (Read 2958 times)
0 Members and 1 Guest are viewing this topic.
neongen
Rookie
**
Offline Offline

Posts: 64


Re: Updated PrivGroup Module - Additional functionality
« Reply #15 on: May 23, 2006, 09:55:37 PM »

how do i make the !join free so they don't need to be on a guest list to join the guest channel?
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: Updated PrivGroup Module - Additional functionality
« Reply #16 on: May 27, 2006, 08:25:58 AM »

You will need to move the !join command handler from the tell() to tell2() function is the easiest way to explain that.
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
neongen
Rookie
**
Offline Offline

Posts: 64


Re: Updated PrivGroup Module - Additional functionality
« Reply #17 on: July 28, 2006, 07:22:38 AM »

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 Sad
Logged
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Updated PrivGroup Module - Additional functionality
« Reply #18 on: July 28, 2006, 10:04:34 AM »

Look in other modules...

Logged

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

Posts: 64


Re: Updated PrivGroup Module - Additional functionality
« Reply #19 on: July 28, 2006, 11:12:58 AM »

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
Logged
Tsuyoi
Rookie
**
Offline Offline

Gender: Male
Posts: 30


BigT


WWW
Re: Updated PrivGroup Module - Additional functionality
« Reply #20 on: July 28, 2006, 01:23:23 PM »

Changes to make to this module to get it working for everyone:

Find:
Code:
$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:

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

Then Find:
Code:
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:
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.
Logged
Tsuyoi
Rookie
**
Offline Offline

Gender: Male
Posts: 30


BigT


WWW
Re: Updated PrivGroup Module - Additional functionality
« Reply #21 on: July 28, 2006, 01: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:
$commands['tell']['lock'] &$privgroup;
Should be:
Code:
$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:
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:
    function join($name) {
        if(!$this -> bot -> commands['tell']['banlist'] -> bancheck($who)) {

Shouldn't it be:
Code:
    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. Smiley
Logged
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Updated PrivGroup Module - Additional functionality
« Reply #22 on: July 28, 2006, 02: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 Tongue
Logged

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

Posts: 64


Re: Updated PrivGroup Module - Additional functionality
« Reply #23 on: July 30, 2006, 04: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  Undecided

but it looks like you post helped me out there. so tyvm  Smiley
Logged
Sammajos
Freshman
*
Offline Offline

Posts: 9


Re: Updated PrivGroup Module - Additional functionality
« Reply #24 on: October 08, 2006, 07:17:46 AM »

[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.
Logged
neongen
Rookie
**
Offline Offline

Posts: 64


Re: Updated PrivGroup Module - Additional functionality
« Reply #25 on: October 10, 2006, 05:09:00 PM »

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';
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 841



WWW
Re: Updated PrivGroup Module - Additional functionality
« Reply #26 on: May 01, 2007, 07:07:13 PM »

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);
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Updated PrivGroup Module - Additional functionality
« Reply #27 on: May 02, 2007, 01:06:56 AM »

You need the module here. 

-jj-
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 841



WWW
Re: Updated PrivGroup Module - Additional functionality
« Reply #28 on: May 02, 2007, 10:10:14 AM »

Works now thank you
Logged
craized
BeBot Contributor
Experienced
*******
Offline Offline

Gender: Male
Posts: 165



WWW
Re: Updated PrivGroup Module - Additional functionality
« Reply #29 on: May 21, 2007, 12:23:45 AM »

I don't know if anyone is still getting anything from this thread, but fixed bugs posted by Tsuyoi
Logged

Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]

Pages: 1 [2]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Updated PrivGroup Module - Additional functionality
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[November 21, 2008, 05:14:57 PM]

Log playtime from buddys ...
by Temar
[November 20, 2008, 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11037
Total Topics: 1496
Online Today: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 15
Total: 16
xlDanek

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