* Get a channel object
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function get(string $channel): stdClass|array|bool
{
if (!is_bool($response)) {
return $response->channel;
}
-
- throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+ return false; /* eg user not found */
}
/**
* Set and unset modes on a channel.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_mode(string $channel, string $modes, string $parameters): stdClass|array|bool
{
* Set the channel topic.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_topic(string $channel, string $topic,
string $set_by=null, string $set_at=null): stdClass|array|bool
* Kick a user from the channel.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function kick(string $channel, string $nick, string $reason): stdClass|array|bool
{
* @param string $duration Optional
* @param string $set_by Optional
* @return stdClass|array|bool
- * @throws Exception
*/
public function add(string $name, string $reason, string $duration = NULL, $set_by = NULL): stdClass|array|bool
{
*
* @param string $name
* @return stdClass|array|bool
- * @throws Exception
*/
public function delete(string $name): stdClass|array|bool
{
*
* @param string $name
* @return stdClass|array|bool
- * @throws Exception
*/
public function get(string $name): stdClass|array|bool
{
* Add a spamfilter.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function add(string $name, string $match_type, string $spamfilter_targets, string $ban_action, string $ban_duration, string $reason): stdClass|array|bool
{
* Delete a spamfilter.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function delete(string $name, string $match_type, string $spamfilter_targets, string $ban_action): stdClass|array|bool
{
* Get a specific spamfilter.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function get(string $name, string $match_type, string $spamfilter_targets, string $ban_action): stdClass|array|bool
{
/**
* Return a list of all users.
- *
- * @throws Exception
*/
public function getAll(): stdClass|array|bool
{
* Return a user object
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function get(string $nick): stdClass|array|bool
{
* Set the nickname of a user (changes the nick)
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_nick(string $nick, string $newnick): stdClass|array|bool
{
* Set the username/ident of a user
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_username(string $nick, string $username): stdClass|array|bool
{
* Set the realname/gecos of a user
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_realname(string $nick, string $realname): stdClass|array|bool
{
* Set a virtual host (vhost) on the user
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_vhost(string $nick, string $vhost): stdClass|array|bool
{
* Change the user modes of a user.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_mode(string $nick, string $mode, bool $hidden = false): stdClass|array|bool
{
* Change the snomask of a user (oper).
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_snomask(string $nick, string $snomask, bool $hidden = false): stdClass|array|bool
{
* Make user an IRC Operator (oper).
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function set_oper(string $nick, string $oper_account, string $oper_class,
string $class = null, string $modes = null,
* Join a user to a channel.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function join(string $nick, string $channel,
string $key = null, bool $force = false): stdClass|array|bool
* Part a user from a channel.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function part(string $nick, string $channel, bool $force = false): stdClass|array|bool
{
* Quit a user from IRC. Pretend it is a normal QUIT.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function quit(string $nick, string $reason): stdClass|array|bool
{
* Kill a user from IRC. Show that the user is forcefully removed.
*
* @return stdClass|array|bool
- * @throws Exception
*/
public function kill(string $nick, string $reason): stdClass|array|bool
{