예제 #1
0
파일: echo_bot.py 프로젝트: aosdict/knob2
def privmsg_fn(bot, msg):
   sender = msg.getName()
   recipient = msg.params[0]
   if recipient == bot.nick:
      bot.say(msg.trail, sender)
   else:
      bot.say(msg.trail, recipient)
예제 #2
0
def say(to, s):
    if s:
        if s.startswith('!'): # 다른 봇과 충돌하지 않도록
            s = u'!' + s[1:]
        bot.say(to, s.encode('utf-8'))
예제 #3
0
파일: botimpl.py 프로젝트: calvin/mcbot
def say(s):
    if s: bot.say(bot.CHANNEL, s.encode('utf-8'))
예제 #4
0
def say(s):
    if s: bot.say(bot.CHANNEL, s if isinstance(s, str) else str(s))
예제 #5
0
파일: botimpl.py 프로젝트: namongk/mcbot
def say(s):
    if s: bot.say(bot.CHANNEL, s if isinstance(s, str) else str(s))