Some cleanup, add sage command
This commit is contained in:
parent
bf67fa1351
commit
0f31751105
1 changed files with 10 additions and 3 deletions
|
@ -110,7 +110,6 @@ plugin.AddHook('irc.Message', 'nag', function(Username, Channel, Message)
|
|||
return
|
||||
end
|
||||
local Target = Username:lower()
|
||||
if Target == 'enleth' then return end
|
||||
if Nagged[Target] == nil or Nagged[Target] < os.time() then
|
||||
local Body, Code, Headers, Status = https.request('https://kasownik.hackerspace.pl/api/months_due/' .. Target .. '.json')
|
||||
if Code == 200 then
|
||||
|
@ -151,7 +150,7 @@ plugin.AddCommand('mana', 0, function(Username, Channel)
|
|||
local Paid = Data['content']['paid']
|
||||
local Updated = Data['modified']
|
||||
Channel:Say(string.format("%i paid, %i required (last updated %s)", Paid, Required, Updated))
|
||||
end, "Show Hackerspace mana (due fees in total.")
|
||||
end, "Show Hackerspace mana (due fees in total).")
|
||||
|
||||
plugin.AddCommand('describe', 1, function(Username, Channel, Term)
|
||||
local db = plugin.DBOpen('main')
|
||||
|
@ -163,7 +162,7 @@ plugin.AddCommand('describe', 1, function(Username, Channel, Term)
|
|||
if not Header then
|
||||
Channel:Say(string.format('I heard "%s" is:', Term))
|
||||
Header = true
|
||||
end
|
||||
end
|
||||
local Text = Row2._text
|
||||
Channel:Say(string.format('[%i] ', Counter) .. Text)
|
||||
Counter = Counter + 1
|
||||
|
@ -212,3 +211,11 @@ plugin.AddCommand('kapela', 0, function(Username, Channel)
|
|||
local Bandname = bandnames[(os.time() % #bandnames) + 1]
|
||||
Channel:Say(Bandname)
|
||||
end, "Get a bandname from /r/Bandnames")
|
||||
|
||||
plugin.AddCommand('sage', 1, function(Username, Channel, Target)
|
||||
if Target == "klacz" or Target == "ood" then
|
||||
irc:_Send("KICK " .. Channel.Name .. " " .. Username .. " :Gdzie na pana rękę podnosisz, polski psie?!")
|
||||
else
|
||||
irc:_Send("KICK " .. Channel.Name .. " " .. Target .. " :Your behaviour is not conducive to the desired environment.")
|
||||
end
|
||||
end, "Remove kebab")
|
||||
|
|
Loading…
Reference in a new issue