-
Notifications
You must be signed in to change notification settings - Fork 5
Anope
- To have Anope installed and connected to your IRCd
- To have Anope configured to use
db_sql
ordb_sql_live
(remember to take note of theprefix
option you used in your Anope modules configuration. If you're unsure what to put, just putanope_
- To have an SQL database that Anope and Valeyard can read/write to.
- (Optional) phpMyAdmin - This will allow you to view your database and confirm everything worked fine.
If you don't have an SQL database setup, please check out the dependencies list for installing Valeyard
Taking from earlier note our prefix, open up gateway.config.php using your favourite editor. I'll use nano
here.
$ nano gateway.config.php
Now you'll want to add in a line for Valeyard to know your Anope table prefix from earlier, so it knows where to read information from.
For example, if you went with anope_
, your line here would be:
"anopetable" => "anope_",
Doesn't really matter where you add it, however if you do add it at the bottom, be careful to take note to add a comma at the end of the previous line so as not to mess up the array
(Re)start your bot!
This will check Anope's tables if the user is registered. This does NOT check if the user is online.
It will return true
or false
This will check Anope's tables if the user is online.
It will return true
or `false.
This will let you search by column where $search = column for information related to a users current session.
Example:
echo NsInfo("Valware","ident");
The above would, at least on my network, return ~val
If none is found, false
is returned.
Please see Anope's SQL tables for available columns.
This will return true
or false
depending on if the $chan is in $nick's NickServ AJOIN list.
This will return 1
if the operation completed successfully, or an error.
Example:
`if (($result = AddAjoinEntry($nick,$chan)) !== 1){ echo $error; }
This will return 1
if the operation completed successfully, or an error.
This will return true
or false
depending on if the $chan is registered with ChanServ.
This will return true
or false
depending on if the $chan exists.
This will convert a users nick to their unique ID in the SQL table.
Else it will return false
This will convert a users unique ID in the SQL table to their nick.
Else it will return false
This will convert a channel to it's unique ID in the SQL table.
Else it will return false
This will convert a channel's unique ID in the SQL table to its channel name.
Else it will return false
Returns true
if $nick is currently on $chan.
Else it will return false
Returns the hostname of $nick.
Else it will return false
Returns the ident of $nick.
Else it will return false
Returns the GECOS/realname of a $nick.
Else it will return false
Returns the logged in account of a $nick.
Else it will return false
Returns true
if $nick is marked as away.
Else it will return false
Returns $nick's AWAY message if $nick is set AWAY.
Else it will return false
Returns a users IP address if they are online.
Else it will return false
Returns a users usermodes if they are online.
Else it will return false
Returns the UUID of $nick if they are online.
Else it will return false
Returns the CTCP VERSION response asked for by StatServ if $nick is online.
Else it will return false
Returns a userhost in nick!ident@hostname
format if $nick is online.
Else it will return false
Suggested by Koragg. Returns userhost in nick!ident@hostname#realname
format if $nick is online.
Else it will return false