Rename Module -> Plugin with basic find/replace
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
defmodule Omnibot.Contrib.Fortune do
|
||||
use Omnibot.Module
|
||||
use Omnibot.Plugin
|
||||
|
||||
@fortunes [
|
||||
"Reply hazy, try again",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
defmodule Omnibot.Contrib.Wordbot do
|
||||
use Omnibot.Module.Base
|
||||
use Omnibot.Plugin.Base
|
||||
use Supervisor
|
||||
require Logger
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user