Пример #1
0
 def send_global_message(self, ship, user, message, server=None):
     if not check_pso2_with_irc(message):
         return
     if server is None:
         self.msg(
             self.factory.channel, "[G-%02i] <%s> %s" %
             (ship, user, replace_pso2_with_irc(message)))
     else:
         self.msg(
             self.factory.channel, "(%s) [G-%02i] <%s> %s" %
             (server, ship, user, replace_pso2_with_irc(message)))
Пример #2
0
 def send_global_message(self, ship, user, message1, server=None):
     if not check_pso2_with_irc(message1):
         return
     fb = ("SHIP-%02i") % ship
     shipl = ShipLabel.get(fb, fb)
     if server is None:
         self.msg(
             self.factory.channel, "[%s] <%s> %s" %
             (shipl, user, replace_pso2_with_irc(message1)))
     else:
         self.msg(
             self.factory.channel, "(%s) [%s] <%s> %s" %
             (server, shipl, user, replace_pso2_with_irc(message1)))
Пример #3
0
 def send_global_message(self, ship, user, message, server=None):
     if not check_pso2_with_irc(message):
         return
     if server is None:
         self.msg(self.factory.channel, "[G-%02i] <%s> %s" % (ship, user, replace_pso2_with_irc(message)))
     else:
         self.msg(self.factory.channel, "(%s) [G-%02i] <%s> %s" % (server, ship, user, replace_pso2_with_irc(message)))
Пример #4
0
 def send_global_message(self, ship, user, message, server=None):
     if not check_pso2_with_irc(message):
         return
     fb = ("G-%02i") % ship
     shipl = ShipLabel.get(fb, fb)
     if server is None and redisEnabled:
         server = PSO2PDConnector.connector_conf['server_name']
     if discord:
         if server is None:
             self.say(self.factory.channel, "`[%s] %s`: %s" % (shipl, user, replace_pso2_with_irc(message)), 250)
         else:
             self.msg(self.factory.channel, "`(%s) [%s] %s`: %s" % (server, shipl, user, replace_pso2_with_irc(message)))
     else:
         if server is None:
             self.msg(self.factory.channel, "[%s] <%s> %s" % (shipl, user, replace_pso2_with_irc(message)))
         else:
             self.msg(self.factory.channel, "(%s) [%s] <%s> %s" % (server, shipl, user, replace_pso2_with_irc(message)))
Пример #5
0
 def send_global_message(self, ship, user, message, server=None):
     if not check_pso2_with_irc(message):
         return
     fb = ("G-%02i") % ship
     shipl = ShipLabel.get(fb, fb)
     if server is None:
         self.msg(self.factory.channel, "[%s] <%s> %s" % (shipl, user, replace_pso2_with_irc(message)))
     else:
         self.msg(self.factory.channel, "(%s) [%s] <%s> %s" % (server, shipl, user, replace_pso2_with_irc(message)))
Пример #6
0
 def send_global_message(self, ship, user, message):
     self.msg(
         self.factory.channel, "[G-%02i] <%s> %s" %
         (ship, user, replace_pso2_with_irc(message)))
Пример #7
0
 def send_global_message(self, ship, user, message):
     self.msg(self.factory.channel, "[G-%02i] <%s> %s" % (ship, user, replace_pso2_with_irc(message)))
Пример #8
0
#/bin/python
import sys
from PSO2DataTools import replace_irc_with_pso2, replace_pso2_with_irc

# echo {yel}yel{green}green | python ./PSO2IRC.py
def main():
   f = sys.stdin
   if len(sys.argv) > 1:
      f = open(sys.argv[1])

for line in sys.stdin:
     replace_pso2_with_irc(line, 1)

if __name__ == "__main__":
    main()
Пример #9
0
                                            replace_irc_with_pso2(msg).decode('utf-8', 'ignore')
                                        )
                                    ),
                                    0x3
                                ).build()
                            )
>>>>>>> d4a7bf2cacdd48a2cfb02935e664e0f093252d00

        def send_global_message(self, ship, user, message, server=None):
            if not check_pso2_with_irc(message):
                return
            fb = ("SHIP-%02i") % ship
            shipl = ShipLabel.get(fb, fb)
<<<<<<< HEAD
            if server is None:
                self.msg(self.factory.channel, "``[%s] <%s>``: %s" % (shipl, user, replace_pso2_with_irc(message)))
            else:
                self.msg(self.factory.channel, "(%s) ``[%s] <%s>``: %s" % (server, shipl, user, replace_pso2_with_irc(message)))
=======
            if server is None and redisEnabled:
                server = PSO2PDConnector.connector_conf['server_name']
            if discord:
                if server is None:
                    self.say(self.factory.channel, "`[%s] %s`: %s" % (shipl, user, replace_pso2_with_irc(message)), 250)
                else:
                    self.msg(self.factory.channel, "`(%s) [%s] %s`: %s" % (server, shipl, user, replace_pso2_with_irc(message)))
            else:
                if server is None:
                    self.msg(self.factory.channel, "[%s] <%s> %s" % (shipl, user, replace_pso2_with_irc(message)))
                else:
                    self.msg(self.factory.channel, "(%s) [%s] <%s> %s" % (server, shipl, user, replace_pso2_with_irc(message)))
Пример #10
0
#/bin/python
import sys
from PSO2DataTools import replace_irc_with_pso2, replace_pso2_with_irc


# echo {yel}yel{green}green | python ./PSO2IRC.py
def main():
    f = sys.stdin
    if len(sys.argv) > 1:
        f = open(sys.argv[1])


for line in sys.stdin:
    replace_pso2_with_irc(line, 1)

if __name__ == "__main__":
    main()