Logo
Explore Help
Sign In
intercal/omnibot
1
0
Fork 0
You've already forked omnibot
Code Issues Pull Requests Releases Wiki Activity
Files
73c5f58243d307985eca6665fbc0b15f51b7237b
omnibot/lib/core/join.ex

12 lines
207 B
Elixir
Raw Normal View History

WIP: Move to using modules for implementing core behavior Since modules can now intercept all messages in the channels they're listening for, it'd be cool to have modules handling things like making sure the Omnibot.State stays updated as appropriate, and that pings are ponged, etc. This will probably deprecate the router, since it's been reduced to a single function call, but we'll see about that. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-13 16:04:19 -04:00
defmodule Omnibot.Core.Join do
use Omnibot.Module
alias Omnibot.State
def on_join(channel, nick) do
cfg = State.cfg()
if nick == cfg.nick do
State.add_channel(channel)
end
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 39ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API