Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import requests
  2. import json
  3. import random
  4. import re
  5.  
  6.  
  7. class HasanMod:
  8.         __bot = None
  9.  
  10.         def __init__(self):
  11.                 print "[+] starting plugin '%s'" % self.__class__
  12.                 pass
  13.  
  14.         def register_bot(self, bot):
  15.                 self.__bot = bot
  16.  
  17.         def process_message(self, username, message):
  18.             m = re.findall("[a-zA-Z0=9]*\.[a-zA-Z0=9]*", message)
  19.             links = []
  20.             for potential_link in m:
  21.                 links.append( m[0] )
  22.  
  23.             print links
  24.             self.__bot.sendMessage("I've received your link @%s: %s" % (username, ",".join(links)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement