Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F86230
Admin.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
Admin.md
View Options
#
ircbot
admin
bot
Everything
is
supposed
to
be
ran
inside
a
remote
IEx
console
:
`
./
bin
/
lsg
remote
`
.
##
Connection
management
###
List
Connections
IRC
.
Connection
.
connections
()
###
Add
Connection
conn
=
%{
nick
:
"nick"
,
user
:
"user"
,
name
:
"user"
,
network
:
"netname"
,
host
:
"irc.netname.org"
,
tls
:
true
,
port
:
6697
}
IRC
.
Connection
.
add_connection
(
conn
)
###
Start
Connection
IRC
.
Connection
.
start_connection
(
connection_id
)
###
Stop
Connection
IRC
.
Connection
.
stop_connection
(
connection_id
)
###
Delete
Connection
IRC
.
Connection
.
delete_connection
(
connection_id
)
##
Plugin
management
###
Enabled
plugins
IRC
.
Plugin
.
enabled
()
###
Enable
or
Disable
a
plugin
IRC
.
Plugin
.
disable
(
plugin_module_or_name
)
IRC
.
Plugin
.
enable
(
plugin_module_or_name
)
IRC
.
Plugin
.
switch
(
plugin_module_or_name
)
###
Declare
a
plugin
IRC
.
Plugin
.
declare
(
module
)
##
Account
/
Users
###
Get
an
account
by
ID
IRC
.
Account
.
get
(
id
)
###
Find
account
by
network
&
nick
IRC
.
Account
.
find_by_nick
(
network
,
nick
)
##
Alcoolog
*
History
:
`
AlcoologPlugin
.
user_history
(
id
)
`
###
Remove
an
entry
id
=
""
#
Some
account
id
alc
=
LSG
.
IRC
.
AlcoologPlugin
.
data_state
()
#
249
°
elem
=
h
|>
Enum
.
find
(
fn
(
el
)
->
elem
(
el
,
4
)
==
249
end
)
#
249
cl
elem
=
h
|>
Enum
.
find
(
fn
(
el
)
->
elem
(
el
,
3
)
==
249
end
)
:
dets
.
delete_object
(
alc
.
dets
,
elem
)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 1, 1:12 AM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55401
Default Alt Text
Admin.md (1 KB)
Attached To
rNOLA Nola
Event Timeline
Log In to Comment