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: Private group problems  (Read 5247 times)

0 Members and 1 Guest are viewing this topic.

Offline Foxy

  • BeBot User
  • **
  • Posts: 37
  • Karma: +0/-0
Private group problems
« on: April 24, 2007, 02:37:51 pm »
Ive had this problem for a while now, but cant seem to solve whats doing it.

i am running bebot as a Guild bot, We have friends out the guild that we would like on the private group.

Every time someone joins the Private group, They get kicked out of the private group after about 10secs.

I have updated to the latest version to see if it would solve the issue, but still wont work.


I run bot on a linux Shell server using putty.

Ive checked the logs but it dont say anywhere when they were kicked and why.

[2007-04-12 07:10:50]   [TELL]   [INC]   Foxytrader: !invite aopvp
[2007-04-12 07:10:50]   [TELL]   [OUT]   -> Aopvp: You have been invited to the privategroup by Foxytrader.
[2007-04-12 07:10:50]   [TELL]   [OUT]   -> Foxytrader: Aopvp has been invited to guest/raid chat by Foxytrader.
[2007-04-12 07:10:50]   [PGRP]   [MSG]   [Cjbot] Cjbot: Aopvp has been invited to guest/raid chat by Foxytrader.
[2007-04-12 07:10:54]   [PGRP]   [JOIN]   Aopvp joined privategroup.
[2007-04-12 07:11:05]   [PGRP]   [MSG]   [Cjbot] Aopvp: test
[2007-04-12 07:11:05]   [PGRP]   [MSG]   [Cjbot] Cjbot: Aopvp joined the privategroup.

Then aopvp got kicked for no reason..


Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Private group problems
« Reply #1 on: April 25, 2007, 07:07:03 am »
Which version of bot are you using?

And if you've modded anything in the PrivGroup module, can you post that so we could get an idea as to what might be causing that problem?
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Foxy

  • BeBot User
  • **
  • Posts: 37
  • Karma: +0/-0
Re: Private group problems
« Reply #2 on: April 25, 2007, 10:27:02 am »
BeBot v0.2.11

Code: (PrivGroup.php) [Select]
<?
/*
* PrivGroup.php - Basic featureset for private group handeling (join/kick etc)
*
* BeBot - An Anarchy Online Chat Automaton
* Copyright (C) 2004 Jonas Jax
*
* Developed by Blondengy (RK1)
* Special thanks goes out to Khalem (RK1) for his support.
*
* File last changed at $LastChangedDate: 2005-12-12 19:34:04 -0500 (Mon, 12 Dec 2005) $
* Revision: $Id: PrivGroup.php 37 2005-12-13 00:34:04Z shadowmaster $
*/


$privgroup = new PrivGroup($bot);


$commands["tell"]["join"] = &$privgroup;
$commands["tell"]["chat"] = &$privgroup;
$commands["tell"]["leave"] = &$privgroup;
$commands["tell"]["invite"] = &$privgroup;
$commands["tell2"]["leave"] = &$privgroup;
$commands["pgmsg"]["leave"] = &$privgroup;
$commands["pgmsg"]["invite"] = &$privgroup;
$commands["pgmsg"]["kick"] = &$privgroup;
$commands["gc"]["join"] = &$privgroup;



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



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



/*
This gets called on a tell with the command
*/
function tell($name, $msg)
{
if (preg_match("/^" . $this -> bot -> commpre . "join/i", $msg))
$this -> bot -> aoc -> privategroup_invite($name);
else if (preg_match("/^" . $this -> bot -> commpre . "chat/i", $msg))
$this -> bot -> aoc -> privategroup_invite($name);
else if (preg_match("/^" . $this -> bot -> commpre . "invite$/i", $msg))
$this -> bot -> aoc -> privategroup_invite($name);
else if (preg_match("/^" . $this -> bot -> commpre . "leave/i", $msg))
$this -> bot -> aoc -> privategroup_kick($name);
else if (preg_match("/^" . $this -> bot -> commpre . "invite (.+)$/i", $msg, $info))
$this -> invite($name, "tell", $info[1]);
else
$this -> bot -> send_help($name);
}



/*
This gets called on a tell with the command from person outside guild
*/
function tell2($name, $msg)
{
$this -> bot -> aoc -> privategroup_kick($name);
}



/*
This gets called on a msg in the privgroup with the command
*/
function pgmsg($name, $msg)
{
if (preg_match("/^" . $this -> bot -> commpre . "leave/i", $msg))
$this -> bot -> aoc -> privategroup_kick($name);
else if (preg_match("/^" . $this -> bot -> commpre . "invite (.+)$/i", $msg, $info) && ($this -> bot -> is_member($name)))
$this -> invite($name, "pgmsg", $info[1]);
else if (preg_match("/^" . $this -> bot -> commpre . "kick (.+)$/i", $msg, $info) && ($this -> bot -> is_member($name)))
$this -> kick($name, $info[1]);
}



/*
This gets called on a msg in the guildchat with the command
*/
function gc($name, $msg)
{
if (preg_match("/^" . $this -> bot -> commpre . "join/i", $msg))
$this -> bot -> aoc -> privategroup_invite($name);
}



/*
Kicks a user
*/
function kick($name, $who)
{
if ($this -> bot -> raidbot || $this -> bot -> admin -> in_group($name, "admin") ||
$this -> bot -> admin -> in_group($name, "raidleader"))
$this -> bot -> aoc -> privategroup_kick($who);
else
$this -> bot -> send_tell($name, "You do not have permission to kick someone.");
}



/*
Invite a user to private group.
*/
function invite($from, $type, $who)
{
if (($this -> bot -> guildbot && $this -> bot -> is_member($from)) ||
$this -> bot -> admin -> in_group($from, "raidleader") ||
$this -> bot -> admin -> in_group($from, "admin") ||
$this -> bot -> admin -> in_group($from, "superadmin"))
{
$msg = "Player <font color=#ffff00>" . $who . "</font> does not exist.";
if ($this -> bot -> aoc -> get_uid($who))
{
$this -> bot -> aoc -> privategroup_invite($who);
$this -> bot -> send_tell($who, "You have been invited to the privategroup by " . $from . ".");
$msg = "<font color=#ffff00>" . $who . "</font> has been invited.";
}
}
else
$msg = "You do not have permission to use this command.";


if ($type == "tell")
$this -> bot -> send_tell($from, $msg);
else
$this -> bot -> send_pgroup($msg);
}
}
?>

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Private group problems
« Reply #3 on: April 25, 2007, 11:32:31 am »
I can't see any reason why users are kicked again tbh.

Looks all like it should.

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Private group problems
« Reply #4 on: April 25, 2007, 01:18:04 pm »
You don't have an extremely spammy welcome message or something which could cause the guy to be disconnected from the chat server?

-jj-

Offline Foxy

  • BeBot User
  • **
  • Posts: 37
  • Karma: +0/-0
Re: Private group problems
« Reply #5 on: April 25, 2007, 02:31:33 pm »
when i join the private group i get no welcome msg's appear.

 

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