Rename Module -> Plugin with basic find/replace

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-07-02 18:23:24 -07:00
parent fcfdb17daa
commit 4d7073cfcd
11 changed files with 9 additions and 239 deletions

View File

@@ -1,5 +1,5 @@
defmodule Omnibot.Contrib.Fortune do
use Omnibot.Module
use Omnibot.Plugin
@fortunes [
"Reply hazy, try again",

View File

@@ -1,5 +1,5 @@
defmodule Omnibot.Contrib.Linkbot do
use Omnibot.Module
use Omnibot.Plugin
require Logger
@default_config timeout: 30_000
@@ -19,9 +19,6 @@ defmodule Omnibot.Contrib.Linkbot do
plug Tesla.Middleware.FollowRedirects, max_redirects: 10
plug Tesla.Middleware.Compression, format: "gzip"
@title_regex ~r"<title>(?<title>.+)</title>"i
def get_title(url) do
# 1. check for "meta" tag (in the header) with a "property" attribute of "og:title", and fetch the "content" attribute of that tag
# 2. check for meta tag with attribute "name" == "title", and fetch "content" attribute

View File

@@ -1,5 +1,5 @@
defmodule Omnibot.Contrib.Wordbot do
use Omnibot.Module.Base
use Omnibot.Plugin.Base
use Supervisor
require Logger

View File

@@ -1,6 +1,6 @@
defmodule Omnibot.Contrib.Wordbot.Bot do
use Omnibot.Module.Base
use Omnibot.Module.GenServer
use Omnibot.Plugin.Base
use Omnibot.Plugin.GenServer
alias Omnibot.{Contrib.Wordbot, Irc, State, Util}
require Logger
@@ -128,7 +128,7 @@ defmodule Omnibot.Contrib.Wordbot.Bot do
start_round(irc, channel)
end
## Module callbacks
## Plugin callbacks
@impl true
def on_init(cfg) do