BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Temar on July 09, 2007, 06:29:29 pm
-
function faction_check($name, $mode, $faction)
{
$this -> bot -> aoc -> get_uid($name)
if ($mode == exclude){
line 69>>> if ($who["faction"] !== $faction { return 0; }}
else if ($who["faction"] == $faction { return 1; }
else return false;
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/Bots/Testbot/modules/AutoMember.php on line 69
-
basicly i wana add Faction checking and min level checking
to a module
useing wat is set with flexible security
-
You're missing ) each time after the comparison.
-
oops
-
done that but error stiff coming up
-
maybe its somit to do with the $who["faction"]
im not sure if that correct
because its from an old module
-
That entire codeblock is non functional.
<?php
// Ok, your passing $name, $mode and $faction
function faction_check($name, $mode, $faction)
{
// This makes no sense, your asking the bot to just lookup the UID, but you dont store it anywhere.
$this -> bot -> aoc -> get_uid($name)
// Wont work, you'll likely be looking for 'exclude'
if ($mode == exclude){
// $who doesnt exsist. Maybe your looking to do a whois lookup? You are also missing a closing )
if ($who["faction"] !== $faction { return 0; }}
// Should read:
if ($who["faction"] !== $faction) { return 0; }}
// Same as both above
else if ($who["faction"] == $faction { return 1; }
else return false;
?>
-
some 1 wana write me a new 1 then :p
basicly want somthing to check faction and minlevel
which i will set useing with normal bot settings
didnt wana use flexible security as some might not be useing it so dont want it to req it
the use will be when some 1 joins a private group if it check there faction and min level and if they meet the req it will do somit
-
some 1 wana write me a new 1 then :p
basicly want somthing to check faction and minlevel
which i will set useing with normal bot settings
didnt wana use flexible security as some might not be useing it so dont want it to req it
the use will be when some 1 joins a private group if it check there faction and min level and if they meet the req it will do somit
With all due respect, this is pretty much why Flexible security was added, to do just what your asking.
Except it wont actually grant them access in the first place if they do not meet the requirements.
-
i wasnt sure if having the need to setup flexible security was nessesary
the module im make if to add people who join pgroup and are not on member list but need to meet a few req like being clan
-
One of the ideas behind flexible security is the ability to define user groups without keeping an explicit listing of them. This is archieved by matching them to some characteristics defined by level, faction, profession, org membership and org rank.