Esempio n. 1
0
 def authCallback(nick,account):
     if account in validUsers:
         for ticket in tickets:
             if ticket.isdigit():
                 SNOTMagic.completeTicket(int(ticket), "*****@*****.**" % validUsers[account], "Ticket comped by %s in %s" % (user,channel))
         client.msg(channel, "Emails sent.")
     else:
         client.msg(channel, "Sorry, you are not authorized to perform that action")
Esempio n. 2
0
 def authCallback(nick,account):
     if account in validUsers:
         for ticket in tickets:
             if ticket.isdigit():
                 ticketDict = sp.parseTicket(int(ticket), client.config['snot']['defaultCommand'])
                 if (ticketDict):
                     client.msg(channel, "Flagging %s (%s) as %s" % (ticket, ticketDict['subject'], flags))
                     message = "(Ticket flagged as %s by %s in %s)" % (flags,user,channel)
                     SNOTMagic.flagTicket(int(ticket), "*****@*****.**" % validUsers[account], client.config, flagsArg, message)
                 else:
                     client.msg(channel, "%s does not appear to be a valid ticket" % (ticket,))
     else:
         client.msg(channel, "Sorry, you are not authorized to perform that action")
Esempio n. 3
0
            def authCallback(nick,account):
                if account in validUsers:
                    for ticket in tickets:
                        if ticket.isdigit():
                            ticketDict = sp.parseTicket(int(ticket), client.config['snot']['defaultCommand'])
                            if (ticketDict):
                                client.msg(channel, "Completing %s (%s)" % (ticket, ticketDict['subject']))
                                message = "(Ticket comped by %s in %s)"
                                if userMessage:
                                    message = userMessage + "\n\n" + message
                                SNOTMagic.completeTicket(int(ticket), "*****@*****.**" % validUsers[account], client.config, message % (user,channel))
                            else:
                                client.msg(channel, "%s does not appear to be a valid ticket" % (ticket,))

                else:
                    client.msg(channel, "Sorry, you are not authorized to perform that action")