mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 17:15:36 +08:00
推了第一个single-ws分支
This commit is contained in:
@@ -10,13 +10,13 @@ class Group
|
|||||||
{
|
{
|
||||||
private $group_id;
|
private $group_id;
|
||||||
private $group_name;
|
private $group_name;
|
||||||
private $prefix;
|
//private $prefix;
|
||||||
private $members = [];
|
private $members = [];
|
||||||
|
|
||||||
public function __construct($group_id, $info) {
|
public function __construct($group_id, $info) {
|
||||||
$this->group_id = $group_id;
|
$this->group_id = $group_id;
|
||||||
$this->group_name = $info["group_name"];
|
$this->group_name = $info["group_name"];
|
||||||
$this->prefix = $info["prefix"];
|
//$this->prefix = $info["prefix"];
|
||||||
$member_list = $info["member"];
|
$member_list = $info["member"];
|
||||||
$this->members = [];
|
$this->members = [];
|
||||||
foreach ($member_list as $k => $v) {
|
foreach ($member_list as $k => $v) {
|
||||||
@@ -38,13 +38,6 @@ class Group
|
|||||||
return $this->group_name;
|
return $this->group_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function getPrefix() {
|
|
||||||
return $this->prefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@@ -67,14 +60,6 @@ class Group
|
|||||||
$this->group_name = $group_name;
|
$this->group_name = $group_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* set自定义群称号的方法
|
|
||||||
* @param mixed $prefix
|
|
||||||
*/
|
|
||||||
public function setPrefix($prefix) {
|
|
||||||
$this->prefix = $prefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set群成员的类
|
* set群成员的类
|
||||||
* @param array $members
|
* @param array $members
|
||||||
|
|||||||
@@ -47,9 +47,6 @@ class Admin extends ModBase
|
|||||||
if(Buffer::in_array("su", $user)) Buffer::unsetByValue("su", $user);
|
if(Buffer::in_array("su", $user)) Buffer::unsetByValue("su", $user);
|
||||||
$this->reply("removed operator $user");
|
$this->reply("removed operator $user");
|
||||||
return true;
|
return true;
|
||||||
case "test":
|
|
||||||
$this->reply("Hello world");
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ class Example extends ModBase
|
|||||||
case "ping":
|
case "ping":
|
||||||
$this->reply("pong");
|
$this->reply("pong");
|
||||||
return true;
|
return true;
|
||||||
|
case "test":
|
||||||
|
$this->reply("Hello world");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user