From b39412bf775aa5bc4d53128b8359715499a253a6 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 6 May 2014 22:11:43 -0700 Subject: [PATCH 1/4] Topic: require Halfop+ instead of op --- plugins/Topic/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index b21d07b51..4b0b1dbe9 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -57,7 +57,8 @@ def canChangeTopic(irc, msg, args, state): state.error(format(_('I\'m not currently in %s.'), state.channel), Raise=True) c = irc.state.channels[state.channel] - if irc.nick not in c.ops and 't' in c.modes: + if 't' in c.modes and not c.isHalfopPlus(irc.nick): + # if irc.nick not in c.ops and 't' in c.modes: state.error(format(_('I can\'t change the topic, I\'m not opped ' 'and %s is +t.'), state.channel), Raise=True) From ef607f62bc43b2e9106ee5bf069983baa8858a51 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 6 May 2014 22:16:22 -0700 Subject: [PATCH 2/4] Topic: remove comment i made during testing --- plugins/Topic/plugin.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index 4b0b1dbe9..567738556 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -58,7 +58,6 @@ def canChangeTopic(irc, msg, args, state): Raise=True) c = irc.state.channels[state.channel] if 't' in c.modes and not c.isHalfopPlus(irc.nick): - # if irc.nick not in c.ops and 't' in c.modes: state.error(format(_('I can\'t change the topic, I\'m not opped ' 'and %s is +t.'), state.channel), Raise=True) From 07b836f710a1e3b891c5299404672a447b9d2815 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 6 May 2014 22:47:26 -0700 Subject: [PATCH 3/4] Topic: update error messages too Thanks, Google Translate! --- plugins/Topic/locales/fi.po | 2 +- plugins/Topic/locales/fr.po | 2 +- plugins/Topic/locales/it.po | 2 +- plugins/Topic/plugin.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Topic/locales/fi.po b/plugins/Topic/locales/fi.po index 3b7b8e008..74c77868e 100644 --- a/plugins/Topic/locales/fi.po +++ b/plugins/Topic/locales/fi.po @@ -104,7 +104,7 @@ msgstr "En tällä hetkellä ole kanavalla %s." #: plugin.py:61 msgid "I can't change the topic, I'm not opped and %s is +t." msgstr "" -"En voi vaihtaa aihetta, koska en ole kanavaoperaattori ja kanavalla %s on " +"En voi vaihtaa aihetta, koska en ole kanavapuolioperaattori ja kanavalla %s on " "tila +t." #: plugin.py:68 diff --git a/plugins/Topic/locales/fr.po b/plugins/Topic/locales/fr.po index 0922090bd..e8670bdb1 100644 --- a/plugins/Topic/locales/fr.po +++ b/plugins/Topic/locales/fr.po @@ -94,7 +94,7 @@ msgstr "Je ne suis pas actuellement sur %s." #: plugin.py:61 msgid "I can't change the topic, I'm not opped and %s is +t." -msgstr "Je ne peux changer le topic, je ne suis pas opé, et %s a le mode +t." +msgstr "Je ne peux changer le topic, je ne suis pas halfopé, et %s a le mode +t." #: plugin.py:68 msgid "The topic must not include %q." diff --git a/plugins/Topic/locales/it.po b/plugins/Topic/locales/it.po index 4bab6b39e..104ac42fc 100644 --- a/plugins/Topic/locales/it.po +++ b/plugins/Topic/locales/it.po @@ -75,7 +75,7 @@ msgstr "Attualmente non sono in %s." #: plugin.py:61 msgid "I can't change the topic, I'm not opped and %s is +t." -msgstr "Non posso cambiare il topic, non sono op e %s ha il mode +t." +msgstr "Non posso cambiare il topic, non sono halfop e %s ha il mode +t." #: plugin.py:68 msgid "The topic must not include %q." diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index 567738556..4804172fd 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -58,7 +58,7 @@ def canChangeTopic(irc, msg, args, state): Raise=True) c = irc.state.channels[state.channel] if 't' in c.modes and not c.isHalfopPlus(irc.nick): - state.error(format(_('I can\'t change the topic, I\'m not opped ' + state.error(format(_('I can\'t change the topic, I\'m not (half)opped ' 'and %s is +t.'), state.channel), Raise=True) def getTopic(irc, msg, args, state, format=True): From aff9713f81b48b6580556762a3598bd53df32da6 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 6 May 2014 22:52:56 -0700 Subject: [PATCH 4/4] Topic: I have no clue what i'm doing essentially (fix i18n) --- plugins/Topic/locales/fi.po | 2 +- plugins/Topic/locales/fr.po | 2 +- plugins/Topic/locales/it.po | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Topic/locales/fi.po b/plugins/Topic/locales/fi.po index 74c77868e..c03fb3b2b 100644 --- a/plugins/Topic/locales/fi.po +++ b/plugins/Topic/locales/fi.po @@ -102,7 +102,7 @@ msgid "I'm not currently in %s." msgstr "En tällä hetkellä ole kanavalla %s." #: plugin.py:61 -msgid "I can't change the topic, I'm not opped and %s is +t." +msgid "I can't change the topic, I'm not (half)opped and %s is +t." msgstr "" "En voi vaihtaa aihetta, koska en ole kanavapuolioperaattori ja kanavalla %s on " "tila +t." diff --git a/plugins/Topic/locales/fr.po b/plugins/Topic/locales/fr.po index e8670bdb1..b4d38b792 100644 --- a/plugins/Topic/locales/fr.po +++ b/plugins/Topic/locales/fr.po @@ -93,7 +93,7 @@ msgid "I'm not currently in %s." msgstr "Je ne suis pas actuellement sur %s." #: plugin.py:61 -msgid "I can't change the topic, I'm not opped and %s is +t." +msgid "I can't change the topic, I'm not (half)opped and %s is +t." msgstr "Je ne peux changer le topic, je ne suis pas halfopé, et %s a le mode +t." #: plugin.py:68 diff --git a/plugins/Topic/locales/it.po b/plugins/Topic/locales/it.po index 104ac42fc..10139c9fc 100644 --- a/plugins/Topic/locales/it.po +++ b/plugins/Topic/locales/it.po @@ -74,7 +74,7 @@ msgid "I'm not currently in %s." msgstr "Attualmente non sono in %s." #: plugin.py:61 -msgid "I can't change the topic, I'm not opped and %s is +t." +msgid "I can't change the topic, I'm not(half)opped and %s is +t." msgstr "Non posso cambiare il topic, non sono halfop e %s ha il mode +t." #: plugin.py:68