Skip to content

Commit fa11fc1

Browse files
authored
Merge pull request CloudBotIRC#185 from linuxdaemon/gonzobot+fix-herald-display
Fix accidentally only showing the first character of a herald
2 parents 67bf83e + bf6016f commit fa11fc1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/herald.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import time
44
from collections import defaultdict
55

6-
from sqlalchemy import Table, Column, String, PrimaryKeyConstraint, select
6+
from sqlalchemy import Table, Column, String, PrimaryKeyConstraint
77

88
from cloudbot import hook
99
from cloudbot.util import database
@@ -48,7 +48,7 @@ def herald(text, nick, chan, db, reply):
4848
db.execute(query)
4949
db.commit()
5050

51-
reply("greeting \'{}\' for {} has been removed".format(greeting[0], nick))
51+
reply("greeting \'{}\' for {} has been removed".format(greeting, nick))
5252

5353
load_cache(db)
5454
else:
@@ -101,7 +101,7 @@ def welcome(nick, message, bot, chan):
101101

102102
welcome = herald_cache[chan.casefold()].get(nick.casefold())
103103
if welcome:
104-
greet = welcome[0]
104+
greet = welcome
105105
stripped = greet.translate(dict.fromkeys(["\u200b", " ", "\u202f", "\x02"]))
106106
stripped = colors_re.sub("", stripped)
107107
greet = re.sub(bino_re, 'flenny', greet)

0 commit comments

Comments
 (0)