mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
commit
d5d3171794
@ -463,7 +463,7 @@ registerChannelValue(supybot.reply, 'withNotice',
|
|||||||
|
|
||||||
# XXX: User value.
|
# XXX: User value.
|
||||||
registerGlobalValue(supybot.reply, 'withNoticeWhenPrivate',
|
registerGlobalValue(supybot.reply, 'withNoticeWhenPrivate',
|
||||||
registry.Boolean(False, _("""Determines whether the bot will reply with a
|
registry.Boolean(True, _("""Determines whether the bot will reply with a
|
||||||
notice when it is sending a private message, in order not to open a /query
|
notice when it is sending a private message, in order not to open a /query
|
||||||
window in clients. This can be overridden by individual users via the user
|
window in clients. This can be overridden by individual users via the user
|
||||||
configuration variable reply.withNoticeWhenPrivate.""")))
|
configuration variable reply.withNoticeWhenPrivate.""")))
|
||||||
|
@ -241,9 +241,9 @@ class FunctionsTestCase(SupyTestCase):
|
|||||||
prefix = 'foo!bar@baz'
|
prefix = 'foo!bar@baz'
|
||||||
channelMsg = ircmsgs.privmsg('#foo', 'bar baz', prefix=prefix)
|
channelMsg = ircmsgs.privmsg('#foo', 'bar baz', prefix=prefix)
|
||||||
nonChannelMsg = ircmsgs.privmsg('supybot', 'bar baz', prefix=prefix)
|
nonChannelMsg = ircmsgs.privmsg('supybot', 'bar baz', prefix=prefix)
|
||||||
self.assertEqual(ircmsgs.privmsg(nonChannelMsg.nick, 'foo'),
|
self.assertEqual(ircmsgs.notice(nonChannelMsg.nick, 'foo'),
|
||||||
callbacks.reply(channelMsg, 'foo', private=True))
|
callbacks.reply(channelMsg, 'foo', private=True))
|
||||||
self.assertEqual(ircmsgs.privmsg(nonChannelMsg.nick, 'foo'),
|
self.assertEqual(ircmsgs.notice(nonChannelMsg.nick, 'foo'),
|
||||||
callbacks.reply(nonChannelMsg, 'foo'))
|
callbacks.reply(nonChannelMsg, 'foo'))
|
||||||
self.assertEqual(ircmsgs.privmsg(channelMsg.args[0],
|
self.assertEqual(ircmsgs.privmsg(channelMsg.args[0],
|
||||||
'%s: foo' % channelMsg.nick),
|
'%s: foo' % channelMsg.nick),
|
||||||
@ -261,7 +261,7 @@ class FunctionsTestCase(SupyTestCase):
|
|||||||
self.assertEqual(callbacks.reply(msg, 'blah', to='blah'),
|
self.assertEqual(callbacks.reply(msg, 'blah', to='blah'),
|
||||||
ircmsgs.privmsg('#foo', 'blah: blah'))
|
ircmsgs.privmsg('#foo', 'blah: blah'))
|
||||||
self.assertEqual(callbacks.reply(msg, 'blah', to='blah', private=True),
|
self.assertEqual(callbacks.reply(msg, 'blah', to='blah', private=True),
|
||||||
ircmsgs.privmsg('blah', 'blah'))
|
ircmsgs.notice('blah', 'blah'))
|
||||||
|
|
||||||
def testTokenize(self):
|
def testTokenize(self):
|
||||||
self.assertEqual(callbacks.tokenize(''), [])
|
self.assertEqual(callbacks.tokenize(''), [])
|
||||||
|
Loading…
Reference in New Issue
Block a user