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

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

Author Topic: Totally rewritten teamsmodule  (Read 27069 times)

0 Members and 1 Guest are viewing this topic.

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Totally rewritten teamsmodule
« on: July 11, 2005, 10:32:37 am »
Personally I've upgraded to PHP5, so I'm not using this version of the teamsmodule...but I think this is a lot better, and easier to change.

NewTeams.php
Code: [Select]
<?php
//Written by Zacix for BeBot

require_once("_TeamsClass.php");

$newteams = new NewTeams($bot);
$commands["tell"]["startteam"] = &$newteams;
$commands["tell"]["teams"] = &$newteams;
$commands["tell"]["clearteams"] = &$newteams;
$commands["tell"]["addteam"] = &$newteams;
$commands["tell"]["remteam"] = &$newteams;
$commands["tell"]["delteam"] = &$newteams;
$commands["tell"]["setleader"] = &$newteams;
$commands["tell"]["teamadmin"] = &$newteams;
$commands["tell"]["teamname"] = &$newteams;

$commands["pgmsg"]["startteam"] = &$newteams;
$commands["pgmsg"]["teams"] = &$newteams;
$commands["pgmsg"]["clearteams"] = &$newteams;
$commands["pgmsg"]["addteam"] = &$newteams;
$commands["pgmsg"]["remteam"] = &$newteams;
$commands["pgmsg"]["delteam"] = &$newteams;
$commands["pgmsg"]["setleader"] = &$newteams;
$commands["pgmsg"]["teamadmin"] = &$newteams;
$commands["pgmsg"]["teamname"] = &$newteams;
$commands["pgjoin"][] = &$newteams;
$commands["pgleave"][] = &$newteams;

/*
The Class itself...
*/
class NewTeams {
  var 
$bot;
  var 
$pgroup;
  var 
$numteams;
  var 
$infotext;
  var 
$headertext;
  var 
$teams;
  
/*
  Constructor:
  Hands over a referance to the "Bot" class.
  */
  
function NewTeams (&$bot) {
    
$this -> bot = &$bot;
    
$this -> teams = array();
    
$this -> numteams 0;
    
$this -> pgroup = array(array());
    
$this -> infotext "<font color=#66aa66>";
    
$this -> headertext "<font color=#dd4444>";
    
$this -> highlight "<font color=#00FFFF>";
  }
  
  function 
SetTeamLeader($name,$num,$executer) {
    
$highlight $this -> highlight;
    
$infotext $this->infotext;
 
$headertext $this->headertext;
 

    if(
preg_match("#^[1-9]#"$num)) {
      if(
$num <= count($this->teams) && $num 0) {
        
$team =& $this->GetTeam($num);
        
$member =& $team->GetMember($name);
        if(
$member){
          
$team->ClearLeader();
          
$member->SetLeader(true);
          
$this->bot->send_pgroup($infotext "[" $highlight $name ."</font>] is new leader of team " $highlight $num "</font></font>");
        }
        else {
          
$this->bot->send_tell($executer,$infotext "[" $highlight $name ."</font>] is not in team " $highlight $num "</font></font>");
        }
      }
      else {
        
$this->bot->send_tell($executer,$infotext "Team " $highlight $num "</font> does not exist</font>");
      }
    }
    else {
      
$this->bot->send_tell($executer,$infotext "Usage: !setleader &lt;number&gt; &lt;name&gt;</font>");
    }
  }
  
  function 
PrintTeams() {
    
$highlight $this -> highlight;
    
$infotext $this->infotext;
    
$headertext $this->headertext;

    foreach(
$this->teams as $index=>$team) {
      if(
$team->GetName() == "") {
        
$msg $infotext "Team " $highlight bcadd($index,1) . "</font> (" $highlight $team->Count() . "</font>) :: ";
      }
      else {
        
$msg $infotext "Team " $highlight bcadd($index,1) . "</font> :: \"" $team->GetName() . "\" (" $highlight $team->Count() . "</font>) :: ";
      }

      
$members =& $team->GetTeamMembers();
      foreach(
$members as $index=>$teammember) {
        if(
$teammember->IsLeader()) {
          
$msg .= "[" $headertext $teammember->GetName() . " :: Leader</font>]";
}
else {
          
$msg .= "[" $highlight $teammember->GetName() . "</font>]";
}
      }
      
$msg .= "</font>";
      
$this->bot->send_pgroup($msg);
    }
  }
  
  function 
AddTeam(&$team) {
    
array_push($this->teams,&$team);
  }
  
  function 
ClearTeams($name) {
    
$highlight $this -> highlight;
    
$infotext $this->infotext;
    foreach(
$this->teams as $index=>$teams) {
      
$this->DelTeam(1,$name);
    }
    
$this->bot->send_pgroup($infotext "Teams cleared by [" $highlight $name "</font>]</font>");
  }
  
  function 
DelTeam($num,$executer) {
    if(
preg_match("#^[1-9]#"$num)) {
      if(
$num <= count($this->teams) && $num 0) {
        
$team =& $this->teams[$num-1];
        foreach(
$team->GetTeamMembers() as $index=>$member) {
          if(isset(
$this->pgroup[$member->GetName()])) {
            
$this->pgroup[$member->GetName()][4] = true;
          }
        }
        unset(
$this->teams[$num-1]);
        
$this->numteams--;
        
$this->teams array_values($this->teams);
      }
      else {
        
$this->bot->aoc->send_tell($executer,$infotext "Team " $highlight $num "</font> does not exist</font>");
      }
    }
    else {
      
$this->bot->aoc->send_tell($executer,$infotext "Usage: !delteam &lt;number&gt;</font>");
    }
  }
  
  function &
GetTeam($num) {
    return 
$this->teams[$num-1];
  }
  
  function 
DelTeamMember($name,$executer,$suppress=true) {
    
$highlight $this -> highlight;
    
$infotext $this->infotext;
    
$headertext $this->headertext;
    
$return false;

    if(
$this->bot->aoc->get_uid($name)) {
      for(
$i=1;$i<=count($this->teams);$i++) {
        
$team =& $this->GetTeam($i);
        if(
$team->DelMember($name)) {
          if(isset(
$this->pgroup[$name])) {
            
$this->pgroup[$name][4] = true;
          }
          
$return true;
          if(!
$suppress) {
            
$this->bot->send_pgroup($infotext "[" $highlight $name ."</font>] has been removed from team " $highlight $i "</font></font>");
          }
        }
        else {
          
$return $return false;
        }
      }
      return 
$return;
    }
    else {
      
$this->bot->send_tell($executer,$infotext "Usage: !remteam &lt;name&gt;</font>");
      return 
false;
    }
  }
  
  function 
AddTeamMember($name,$num,$executer) {
    
$highlight $this -> highlight;
$infotext $this->infotext;
$headertext $this->headertext;

if(preg_match("#^[1-9]#"$num)) {
      if(
$num <= count($this->teams) && $num 0) {
if($name != "") {
      if(isset($this->pgroup[$name])) {
            
$member =& new TeamMember($this->pgroup[$name][0],$this->pgroup[$name][1],$this->pgroup[$name][2],$this->pgroup[$name][3]);
            
$team =& $this->GetTeam($num);
            
$teammembers =& $team->GetTeamMembers();
            
print_r(get_object_vars($teammembers));
            if(
array_search($member,$teammembers)) {
              
$this->bot->send_pgroup($infotext .$highlight $name "</font> is already in team " $highlight $num "</font></font>");
              return;
            }
            else {
              
$deleted $this->DelTeamMember($name,$executer);
            }
            
            
            if(
$team->AddMember($member)) {
              
$this->pgroup[$name][4] = false;
              if(
$deleted) {
                
$this->bot->send_pgroup($infotext "[" $highlight $name "</font>] changed to team " $highlight $num "</font></font>");
              }
              else {
                
$this->bot->send_pgroup($infotext "[" $highlight $name "</font>] has been added to team " $highlight $num "</font></font>");
              }
            }
            else {
              
$this->bot->send_pgroup($infotext "Team " $highlight $num "</font> is full</font>");
            }
  }
  else {
$this->bot->aoc->send_tell($executer,$infotext "[" $highlight $name "</font>] is not in the group</font>");
  }
  
}
else {
}
      }
  else {
$this->bot->aoc->send_tell($executer,$infotext "Team " $highlight $num "</font> does not exist</font>");
  }
}
else {
  $this->bot->aoc->send_tell($executer,$infotext "Usage: !teamadd &lt;number&gt; &lt;name&gt;</font>");
    }
  }
  
  function 
StartTeam($executer,$name,$teamname) {
    
$highlight $this -> highlight;
    
$infotext $this->infotext;
    
$headertext $this->headertext;
    
    if(
$name != "") {
      if(isset(
$this->pgroup[$name])) {
        
$this->DelTeamMember($name,$executer);
        
$member = &new TeamMember($this->pgroup[$name][0],$this->pgroup[$name][1],$this->pgroup[$name][2],$this->pgroup[$name][3],true);
        
$team = &new Team($member,$teamname);
        ++
$this->numteams;
        
$this->pgroup[$name][4] = false;
        
$this->AddTeam($team);
        
$this->bot->send_pgroup($infotext "Team " $highlight $this->numteams "</font> has been started. Leader is [" $highlight $name "</font>]</font>");
      }
      else {
        
$this->bot->send_pgroup($infotext "[" $highlight $name "</font>] is not in the group</font>");
      }
    }
  }
  
  function 
SetTeamName($teamname,$num,$executer) {
    if(
preg_match("#^[1-9]#"$num)) {
      if(
$num <= count($this->teams) && $num 0) {
        
$team =& $this->GetTeam($num);
        
$team->SetName($teamname);
      }
      else {
        
$this->bot->aoc->send_tell($executer,$infotext "Team " $highlight $num "</font> does not exist</font>");
      }
    }
    else {
      
$this->bot->aoc->send_tell($executer,$infotext "Usage: !teamname &lt;number&gt; &lt;name&gt;</font>");
    }

  }
  
  function 
GetPlayerInfo($name) {
    
$uid $this->bot->aoc->get_uid($name);
    
$member $this->bot->db->select("SELECT nickname,level,profession,guild,updated FROM members WHERE id = " $uid);
    if(
$member && (bcsub(time(),$member[0][4]) < (60*60*12))) {
      if(
$member[0][3] == "") {
        
$member[0][3] = "Unknown";
      }
      
$member[0][0] = $name;
      
$member[0][4] = true;
      return 
$member[0];
    }
    else if((
$site $this->bot->get_site("http://www.anarchy-online.com/character/bio/d/" $this -> bot -> dimension "/name/" strtolower($name) . "/bio.xml")) != "") {
      
$member[0] = $name;
      
$member[1] = $this -> bot -> xmlparse($site"level");
      
$member[2] = $this -> bot -> xmlparse($site"profession");
      
$member[3] = $this -> bot -> xmlparse($site"guild");
      
$member[4] = true;
      return 
$member;
    }
    else if(
$member){
      if(
$member[0][3] == "") {
        
$member[0][3] = "Unknown";
      }
      
$member[0][0] = $name;
      
$member[0][4] = true;
      return 
$member[0];
    }
    else {
      
$member[0] = $name;
      
$member[1] = "Unknown";
      
$member[2] = "Unknown";
      
$member[3] = "Unknown";
      
$member[4] = true;
      return 
$member;
    }
  }
  
  function 
pgmsg($name,$msg) {
    
$msg explode(" ",$msg);
    
    if(
strtolower($msg[0]) == $this->bot->commpre "startteam") {
      
$this->StartTeam($name,ucfirst(strtolower($msg[1])),implode(" ",array_slice($msg,2)));
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "teams") {
      
$this->PrintTeams();
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "addteam") {
      
$this->AddTeamMember(ucfirst(strtolower($msg[2])),$msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "remteam") {
      
$this->DelTeamMember(ucfirst(strtolower($msg[1])),$name,false);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "delteam") {
      
$this->DelTeam($msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "setleader") {
      
$this->SetTeamLeader(ucfirst(strtolower($msg[2])),$msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "teamname") {
      
$this->SetTeamName(implode(" ",array_slice($msg,2)),$msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "clearteams") {
      
$this->ClearTeams($name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "teamadmin") {
      
$this->GetAdminConsole($name);
    }
  }
  
  function 
tell($name,$msg) {
    
$msg explode(" ",$msg);

    if(
strtolower($msg[0]) == $this->bot->commpre "startteam") {
      
$this->StartTeam($name,ucfirst(strtolower($msg[1])),implode(" ",array_slice($msg,2)));
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "teams") {
      
$this->PrintTeams();
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "addteam") {
      
$this->AddTeamMember(ucfirst(strtolower($msg[2])),$msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "remteam") {
      
$this->DelTeamMember(ucfirst(strtolower($msg[1])),$name,false);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "delteam") {
      
$this->DelTeam($msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "setleader") {
      
$this->SetTeamLeader(ucfirst(strtolower($msg[2])),$msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "teamname") {
      
$this->SetTeamName(implode(" ",array_slice($msg,2)),$msg[1],$name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "clearteams") {
      
$this->ClearTeams($name);
    }
    else if(
strtolower($msg[0]) == $this->bot->commpre "teamadmin") {
      
$this->GetAdminConsole($name);
    }
  }
  
  function 
pgjoin($name) {
    
$this->pgroup[$name] = $this->GetPlayerInfo($name);
  }
  
  function 
pgleave($name) {
    unset(
$this->pgroup[$name]);
  }
  
  function 
GetAdminConsole($name) {
    
$highlight $this -> highlight;
    
$infotext $this->infotext;
    
$headertext $this->headertext;
    
    
$msg  $infotext $headertext ":::: Teams Administration ::::</font>\n\n";
    
$msg .= $highlight "Commands:</font>\n";
$msg .= "<a href='chatcmd:///tell <botname> <pre>teamadmin'>Refresh Teams Administration</a>\n";
$msg .= "<a href='chatcmd:///tell <botname> <pre>teams'>Show Teams</a>\n";
$msg .= "<a href='chatcmd:///tell <botname> <pre>clearteams'>Clear Teams</a>\n\n";

foreach($this->teams as $index=>$team) {
      if(
$team->GetName() == "") {
        
$msg .= $infotext ":: Team " $highlight bcadd($index,1) . "</font> (" $highlight $team->Count() . "</font>) :: ";
        
$msg .= "<a href='chatcmd:///tell <botname> <pre>delteam " bcadd($index,1) . "'>Del</a>\n";
      }
      else {
        
$msg .= $infotext ":: Team " $highlight bcadd($index,1) . "</font> :: \"" $team->GetName() . "\" (" $highlight $team->Count() . "</font>) :: ";
        
$msg .= "<a href='chatcmd:///tell <botname> <pre>delteam " bcadd($index,1) . "'>Del</a>\n";
      }

      
$members =& $team->GetTeamMembers();
      foreach(
$members as $indexteam=>$teammember) {
        if(
$teammember->IsLeader()) {
          
$msg .= "\t[" $headertext $teammember->GetName() . " :: Leader</font>] (" $teammember->GetLevel() . " " $teammember->GetProfession() . ") ";
          
$msg .= $this->GetExtraInfo($teammember->GetName(),$index+1);
}
else {
          
$msg .= "\t[" $highlight $teammember->GetName() . "</font>] (" $teammember->GetLevel() . " " $teammember->GetProfession() . ") ";
          
$msg .= $this->GetExtraInfo($teammember->GetName(),$index+1);
}
foreach($this->teams as $indexteam=>$teams) {
          
$msg .= "/";
          
$msg .= "<a href='chatcmd:///tell <botname> <pre>addteam " bcadd($indexteam,1) . " " $teammember->GetName() . "'>" bcadd($indexteam,1) . "</a>";
        }
        
$msg .= "\n";
      }
      
$msg .= "\n";
    }
    
$msg .= "\n";
    
$msg .= $headertext "::Looking For Team::</font>\n\n";
foreach($this->pgroup as $index=>$array) {
      
$test $array;
      if(
$array[4]) {
        
$msg .= "\t[" $highlight $array[0] . "</font>] (" $array[1] . " " $array[2] . ") :: ";
        
$msg .= "<a href='chatcmd:///tell <botname> <pre>startteam $array[0]'>Start Team</a>";
        foreach(
$this->teams as $indexteam=>$teams) {
          
$msg .= "/";
          
$msg .= "<a href='chatcmd:///tell <botname> <pre>addteam " bcadd($indexteam,1) . " " $test[0] . "'>" bcadd($indexteam,1) . "</a>";
        }
        
$msg .= "\n";
      }
    }
    
$msg .= "</font>";
    
$this->bot->aoc->send_tell($name,$this->bot->make_blob("Teams Administration",$msg));
  }
  
  function 
GetExtraInfo($name,$index) {
    
$msg .= "<a href='chatcmd:///tell <botname> <pre>remteam $name'>Rem</a>/";
    
$msg .= "<a href='chatcmd:///tell <botname> <pre>startteam $name'>Sta</a>/";
    
$msg .= "<a href='chatcmd:///tell <botname> <pre>setleader $index $name'>Lead</a>";
    return 
$msg;
  }
}
?>

_TeamsClass.php
Code: [Select]
<?php
//Written by Zacix for BeBot

define("MAXMEM"6);

class 
Team {
  var 
$teamMembers;
  var 
$teamName;
  var 
$numMembers;
  var 
$leader;
  
  function 
Team(&$teamMember,$teamName) {
    
$this->teamMembers = array();
    
$this->teamName $teamName;
    
$this->numMembers 0;
    
$this->AddMember(&$teamMember);
  }
  
  function 
SetLeader(&$teamMember) {
    
$this->leader = &$teamMember;
  }
  
  function 
AddMember(&$teamMember) {
    if(
count($this->teamMembers) < MAXMEM) {
      
$this->numMembers++;
      return 
array_push($this->teamMembers,&$teamMember);
    }
    else {
      return 
false;
    }
  }
  
  function 
DelMember($name) {
    
$offset $this->GetMemberOffset($name);
    if(!
is_bool($offset)) {
      unset(
$this->teamMembers[$offset]);
      
$this->teamMembers array_values($this->teamMembers);
      
$this->numMembers--;
      return 
true;
    }
    else {
      return 
false;
    }
  }
  
  function 
GetMemberOffset($name) {
    for(
$i=0;$i<count($this->teamMembers);$i++) {
      if(
$this->teamMembers[$i]->GetName() == $name) {
        return 
$i;
      }
    }
    return 
false;
  }
  function &
GetMember($name) {
    for(
$i=0;$i<count($this->teamMembers);$i++) {
      
print_r(get_object_vars($this->teamMembers[$i]));
      if(
$this->teamMembers[$i]->GetName() == $name) {
        return 
$this->teamMembers[$i];
      }
    }
    return 
false;
  }
  
  function 
Count() {
    return 
$this->numMembers;
  }
  
  function 
Clear() {
    for(
$i=0;$i<count($this->teamMembers);$i++) {
      
$this->teamMembers[$i]->DelMember();
    }
  }
  
  function 
ClearLeader() {
    for(
$i=0;$i<count($this->teamMembers);$i++) {
      
$this->teamMembers[$i]->SetLeader(false);
    }
  }
  
  function 
GetName() {
    return 
$this->teamName;
  }
  
  function &
GetTeamMembers() {
    return 
$this->teamMembers;
  }
  
  function 
SetName($name) {
    
$this->teamName $name;
  }
}

class 
TeamMember {
  var 
$name;
  var 
$level;
  var 
$profession;
  var 
$guild;
  var 
$leader;
  
  function 
TeamMember($name,$level,$profession,$guild,$leader=false) {
    
$this->name $name;
    
$this->level $level;
    
$this->profession $profession;
    
$this->guild $guild;
    
$this->leader $leader;
  }
  
  function 
GetName() {
    return 
$this->name;
  }
  
  function 
GetLevel() {
    return 
$this->level;
  }
  
  function 
GetProfession() {
    return 
$this->profession;
  }
  
  function 
GetGuild() {
    return 
$this->guild;
  }
  
  function 
IsLeader() {
    return 
$this->leader;
  }
  
  function 
SetLeader($leader) {
    
$this->leader $leader;
  }
}

?>

Make sure u make 2 files...main module name doesn't really matter, but _TeamsClass.php should be named exactly that unless you want to change the require_once("_TeamsClass.php") in the start of the first file.
« Last Edit: February 28, 2006, 01:26:34 am by Khalem »
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Ltes

  • BeBot User
  • **
  • Posts: 34
  • Karma: +0/-0
    • http://www.ltes.cjb.net/
Totally rewritten teamsmodule
« Reply #1 on: July 13, 2005, 01:30:30 am »
um, do you want me to put this in a php file and upload it to a webserver?


[size=18]Ltes

*RK2*[/size]

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Totally rewritten teamsmodule
« Reply #2 on: July 13, 2005, 09:37:30 am »
if u put it in 2 files as described...go ahead :)
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Totally rewritten teamsmodule
« Reply #3 on: August 01, 2005, 01:40:26 am »
Care to write a help file for it?

ALso, why did you choose two files?
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Totally rewritten teamsmodule
« Reply #4 on: August 02, 2005, 04:14:21 pm »
Helpfiles are really boring to write :shock: It could be I'll do it...but....boooring. Sorry for the lack of commenting of code too (boring too).

The reason I chose 2 files is that the 2nd file is more like an include file. This allows me to include this file in other modules if I want. It doesn't contain any botspecific code, hence it's free to reuse anywhere else. I don't know how much you know about objectoriented programming, but reusable code is a good thing ;)
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Derroylo

  • Contributor
  • *******
  • Posts: 43
  • Karma: +0/-0
Totally rewritten teamsmodule
« Reply #5 on: August 08, 2005, 03:58:36 pm »
there is only one thing i have to say about this

AWESOME WORK MAN   :D
Derroylo 220/23 NT RK2

Offline sentry

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #6 on: February 27, 2006, 10:12:14 pm »
Little new to bebot.. didnt find an answer, and i realize this is an old thread. installed this module and getting this error:

Code: [Select]
Parse error: syntax error, unexpected '&' in C:\BeBot\modules\Teams.php on line 4

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Totally rewritten teamsmodule
« Reply #7 on: February 28, 2006, 01:27:24 am »
Looks like the code you pasted was badly formatted for some reason.

Try grabbing a fresh copy.
BeBot Founder and Fixer Kingpin

Offline sentry

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #8 on: February 28, 2006, 04:26:28 am »
Hmm used the updated copy, and now !teams !addteams etc.. does nothing.

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #9 on: February 28, 2006, 03:26:56 pm »
did you do !startteam <name of person in bot>
Do !teamadmin work?

Do you have any other modules that overwrite the commands in this module? Make sure you unload any other teamrelated module.
You did exactly as my initial post said? E.g. you need to put the code in 2 files. First one can be named whatever, 2nd MUST be named _TeamsClass.php unless you want to change a minor part of the first file.

Also, as you mentioned, the thread is old...so this module isn't really up to date when it comes to custom rights management and so on. I guess the whole module could use a revamp, but that's really up to the community as I have my own project running now.
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Totally rewritten teamsmodule
« Reply #10 on: February 28, 2006, 10:34:51 pm »
The module should work, but it does not give much in the way of error messages iirc.
If i ever get the time i might do a revamp of it.
BeBot Founder and Fixer Kingpin

Offline lonillen

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #11 on: March 03, 2006, 01:04:47 pm »
One thing i noticed when using this module:

if a person is assigned to team and then leaves/rejoins channel, this person stays assigned in the team AND gets added to the lft section in !teamadmin

otherwise really nice one  :)

Offline Barvaz

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #12 on: July 24, 2006, 04:41:55 am »
sorry for the HUGE bump...

but, when im doing the teamadmin command, all commands there just sending me to chat with the bot..

EDIT: sorry, was problem with my bot, sorry for the bump again and great module :)
« Last Edit: July 24, 2006, 07:48:36 pm by Barvaz »

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #13 on: August 01, 2006, 04:31:49 pm »
One thing i noticed when using this module:

if a person is assigned to team and then leaves/rejoins channel, this person stays assigned in the team AND gets added to the lft section in !teamadmin

otherwise really nice one  :)

I'm not maintaining this module anymore, so really up to the Bebot community fix errors if they appear. I got my my own botproject running, which is based on Bebot...so if you decide to run a standalone raidbot and go for RINGBot, you'll get the same teamadmin with the error mentioned fixed ;)
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline MiCR0

  • BeBot Rookie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Totally rewritten teamsmodule
« Reply #14 on: August 06, 2006, 11:41:34 am »
bump great work

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

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