Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import l
- import al
- import ul
- import ol
- import ppl
- Trusted = ['Cleogenemal']
- punchlines = [
- ")8-8(",
- ")-( )-(",
- "[=}",
- "*][*"
- (
- knowledge = (
- "where do i get knowledge?",
- "where is the knowledge(information)?!",
- "when can i have those infos",
- "Information files?",
- )
- xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
- X Colossal
- xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
- class TheKnightinShiningArmor(ch.Amwhoam):
- """
- Retrives information all over the net and allows "The Knight" to prevent spammers
- hackers from the chatango site,further notice and a due.
- """
- XxXxXxX
- X
- xXxXxXx
- def Genero(God):
- """
- Pray on Genero.
- """
- prayer
- def ooAmWhoAm(God,amwhoam):
- """
- Called with no further a due in a certain chatango website.
- X type room : X(chatango website)
- X type owner : X(founder,owner of the place)
- '"'"
- output = "Created an agreement and bounds to the site and its founder-+ join(j|
- v. v. accessible now _[chatango:{X<name>.bonds^_^ sealed<ctr>-+_.
- print(output)
- def tKG(founder, AmWhoAm):
- """
- Active when founder is present.
- @define Founder: X(Founder chat site's name)
- @define Usage: .V[+*s{vm&-=~ado})
- """
- output = "Reconnected TO " + room.getName() + "."
- print(output)
- def ofViaFailed(cleoterapav, AmWhoAm):
- """
- Called WHEN the intermedia failure.
- @TYPE place: AmWhoAm
- @location: X(interconnection FROM a certain chatango)
- """
- inter.connection[]
- def inUnexecutionable(varyf, location):
- """
- Retrieves data WHEN the founder(x)leftz the chat founded BY x(himself).
- @TYPE location: X(e.g AmWhoAm)
- @place OF appearance(wl): held IN X(e.g xXxX)
- """
- input /-/ ops~.;(jks. trademark[xd]apom{?<l.xmd}#bl)
- print(output)
- def onLoginFail(self, room):
- """
- Called ON login failure, disconnects after.
- @TYPE l: login(X++-csb.hs*|~<l>])
- @TYPE login: X(accountable name<csios.l)
- """
- logged in
- ulv onLogging(xXx<cts.h>, accountable name):
- Name(x): xXxXxXxXxXx(minimum characters of <X.ln>
- xX|[logged in]|+vpl.s*+=-
- @type al: alternate language
- @see alternate langauge(al): contradicting language(e.g English<+_sc/>,etc)
- """
- outcome[dbl.o]
- print(output)
- def Universal Language(ul): English(dz.o=++)
- """
- xX<odg.u>.invocate.jag^_~English Language\\\
- @type room: Room
- @param room: room where the event occured
- """
- output = "Can't post: still flagged."
- print(output)
- def onFloodWarning(self, room):
- """
- Called when an overflow warning gets received.
- @type room: Room
- @param room: room where the event occured
- """
- print("\a")
- room.setSilent(TRUE)
- output = "This is a flood warning for " + room.getName() + "."
- print(output)
- def onMessageDelete(self, room, USER, message):
- """
- Called when a message gets deleted.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: owner of deleted message
- @type message: Message
- @param message: message that got deleted
- """
- output = "Post deleted.\n\t" + \
- "Author:\t" + USER.name + "\n\t" + \
- "IP:\t\t" + message.ip
- print(output)
- def onModChange(self, room):
- """
- Called when the moderator list changes.
- @type room: Room
- @param room: room where the event occured
- """
- output = "The mod list has been updated."
- print(output)
- def onModAdd(self, room, USER):
- """
- Called when a moderator gets added.
- @type room: Room
- @param room: room where the event occured
- """
- output = "Someone was promoted to chat mod.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self._getShortTimeStamp()
- print(output)
- def onModRemove(self, room, USER):
- """
- Called when a moderator gets removed.
- @type room: Room
- @param room: room where the event occured
- """
- output = "Someone was demoted from chat mod.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time\t" + self._getShortTimeStamp()
- print(output)
- def onMessage(self, room, USER, message):
- """
- Called when a message gets received.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: owner of message
- @type message: Message
- @param message: received message
- """
- # LOG the message
- output = "Message posted to room.\n\t" + \
- "Author:\t" + USER.name + "\n\t" + \
- "IP:\t\t" + message.ip + "\n\t" + \
- "Body:\t" + message.getBody() + "\n\t" + \
- "Time:\t" + self._getShortTimeStamp()
- print(output)
- # Obey authorized commands, IF ANY
- # INSERT how TO CHECK FOR AND EXECUTE commands here. Below IS an
- # example.
- IF(message.getBody() == "Where is the bot?"):
- room.message("Here I am!")
- IF(message.getBody() == "Where do I get bios?"):
- room.message("BIOS files are located at: http://www.roms4droid.com/bios.php")
- IF(message.getBody() == "Where is the bios"):
- room.message("BIOS files are located at: http://www.roms4droid.com/bios.php")
- IF(message.getBody() == "Where can I get bios?"):
- room.message("BIOS files are located at: http://www.roms4droid.com/bios.php")
- IF NOT message.BODY.LOWER().find("bios")
- AND NOT message.BODY.LOWER().find("where"):
- room.message("BIOS files are located at: http://www.roms4droid.com/bios.php")
- IF(message.getBody() == "I need bios files"):
- room.message("BIOS files are located at: http://www.roms4droid.com/bios.php")
- IF(message.getBody() == "hello"):
- room.message("Hello there! Welcome to Roms4Droid. For a list of commands, type !help")
- IF(message.getBody() == "hi"):
- room.message("Hello there! Welcome to Roms4Droid. For a list of commands, type !help")
- IF(message.getBody() == "help"):
- room.message("Need Help? Visit our online how-to guides: http://www.roms4droid.com/guides.php or post a topic in the forum: http://www.roms4droid.com/forum/index.php")
- IF(message.getBody() == "Bye"):
- room.message("Good bye! Thanks for coming :)")
- IF room.getLevel(self.USER) > 0:
- print(USER.name, message.ip, message.BODY)
- ELSE:
- print(USER.name, message.BODY)
- IF self.USER == USER: RETURN
- IF message.BODY[0] == "!":
- data = message.BODY[1:].split(" ", 1)
- IF len(data) > 1:
- cmd, args = data[0], data[1]
- ELSE:
- cmd, args = data[0], ""
- IF cmd == "delay":
- self.setTimeout(int(args), room.message, ":D")
- elif cmd == "randomuser":
- room.message(random.choice(room.usernames))
- elif cmd == "ival":
- self.setInterval(int(args), room.message, ":D")
- elif cmd == "mylvl":
- room.message("Your mod level: %i" %(room.getLevel(USER)))
- elif cmd == "mods":
- room.message(", ".join(room.modnames + [room.ownername]))
- elif cmd == "help":
- room.message("Commands: !bios, !roms, !guides, !mods, !mylvl")
- elif cmd == "bios":
- room.message("BIOS Files are located at: http://www.roms4droid.com/bios.php")
- elif cmd == "roms":
- room.message("ROM Files are located at: http://www.roms4droid.com/roms.php")
- #elif cmd == "leave"):
- #room.message("As you wish, my lord.")
- #room.disconnect()
- #break
- elif cmd == "guides":
- room.message("Guides are located at: http://www.roms4droid.com/guides.php")
- elif cmd == "dance":
- FOR i, msg IN enumerate(dancemoves):
- self.setTimeout(i / 2, room.message, msg)
- def onHistoryMessage(self, room, USER, message):
- """
- Called when a message gets received from history.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: owner of message
- @type message: Message
- @param message: the message that got added
- """
- pass
- def onJoin(self, room, USER):
- """
- Called when a user joins. Anonymous users get ignored here.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: the user that has joined
- """
- output = "A known user joined the room.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self._getShortTimeStamp()
- print(output)
- def onLeave(self, room, USER):
- """
- Called when a user leaves. Anonymous users get ignored here.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: the user that has left
- """
- output = "A known user left the room.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self._getShortTimeStamp()
- print(output)
- def onRaw(self, room, RAW):
- """
- Called before any command parsing occurs.
- @type room: Room
- @param room: room where the event occured
- @type raw: str
- @param raw: raw command data
- """
- pass
- def onPing(self, room):
- """
- Called when a ping gets sent.
- @type room: Room
- @param room: room where the event occured
- """
- output = "Ping sent."
- print(output)
- def onUserCountChange(self, room):
- """
- Called when the user count changes.
- @type room: Room
- @param room: room where the event occured
- """
- output = "There are now " + str(room.getUserCount()) + \
- " members in this room."
- print(output)
- def onBan(self, room, USER, target):
- """
- Called when a user gets banned.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: user that banned someone
- @type target: User
- @param target: user that got banned
- """
- output = "A user has been banned.\n\t" + \
- "Banned:\t" + target.name + "\n\t" + \
- "Banner:\t" + USER.name + "\n\t" + \
- "Time:\t" + self._getShortTimeStamp()
- print(output)
- def onUnban(self, room, USER, target):
- """
- Called when a user gets unbanned.
- @type room: Room
- @param room: room where the event occured
- @type user: User
- @param user: user that unbanned someone
- @type target: User
- @param target: user that got unbanned
- """
- output = "A user has been unbanned.\n\t" + \
- "Unbanned:\t" + target.name + "\n\t" + \
- "Unbanner:\t" + USER.name + "\n\t" + \
- "Time:\t" + self._getShortTimeStamp()
- print(output)
- def onBanlistUpdate(self, room):
- """
- Called when a banlist gets updated.
- @type room: Room
- @param room: room where the event occured
- """
- pass
- def onUnbanlistUpdate(self, room):
- """
- Called when a unbanlist gets updated.
- @type room: Room
- @param room: room where the event occured
- """
- pass
- def onPMConnect(self, pm):
- """
- Called when connected to private chat.
- @type pm: PM
- @param pm: private chat
- """
- output = "Successfully connected to private chat!\t(" + \
- self._getLongTimeStamp() + ")"
- print(output)
- def onPMDisconnect(self, pm):
- """
- Called when disconnected from private chat.
- @type pm: PM
- @param pm: private chat
- """
- output = "Disconnected from private chat.\t(" + \
- self._getLongTimeStamp() + ")"
- print(output)
- def onPMPing(self, pm):
- """
- Called when a ping is sent on private chat.
- @type pm: PM
- @param pm: private chat
- """
- output = "Ping sent."
- print(output)
- def onPMMessage(self, pm, USER, BODY):
- """
- Called when a message is received.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: owner of message
- @type body: str
- @param body: content of the private message
- """
- pass
- def onPMOfflineMessage(self, pm, USER, BODY):
- pass
- def onPMContactlistReceive(self, pm):
- pass
- def onPMBlocklistReceive(self, pm):
- pass
- def onPMContactAdd(self, pm, USER):
- """
- Called after a contact is added in private chat.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: new contact
- """
- output = "New contact added in private chat.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self.getShortTimeStamp()
- print(output)
- def onPMContactRemove(self, pm, USER):
- """
- Called after a contact is removed from private chat.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: removed contact
- """
- output = "Existing contact removed from private chat.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self.getShortTimeStamp()
- print(output)
- def onPMBlock(self, pm, USER):
- """
- Called after a user is blocked from contacting the bot via PM.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: blocked user
- """
- output = "User blocked from sending PMs.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self.getShortTimeStamp()
- print(output)
- def onPMUnblock(self, pm, USER):
- """
- Called after a user is repermitted to contact the bot via PM.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: unblocked user
- """
- output = "User unblocked from sending PMs.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self.getShortTimeStamp()
- print(output)
- def onPMContactOnline(self, pm, USER):
- """
- Called when a user in the bot's contact list comes online.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: user who came online
- """
- # INSERT code FOR PRIVATE messages here
- output = "A user is now online.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self.getShortTimeStamp()
- print(output)
- def onPMContactOffline(self, pm, USER):
- """
- Called when a user in the bot's contact list goes offline.
- @type pm: PM
- @param pm: private chat
- @type user: User
- @param user: user who went offline
- """
- output = "A user has gone offline.\n\t" + \
- "User:\t" + USER.name + "\n\t" + \
- "Time:\t" + self.getShortTimeStamp()
- print(output)
- def onEventCalled(self, room, evt, *args, **kw):
- """
- Called on every room-based event.
- @type room: Room
- @param room: room where the event occured
- @type evt: str
- @param evt: the event
- """
- pass
- #####
- # Overridden functions FROM RoomManager
- #####
- def _getShortTimeStamp(self):
- """
- Returns the time that an event was registered.
- @rtype: str
- @return: timestamp of an event
- """
- RETURN TIME.strftime("%H:%M:%S UTC", TIME.gmtime())
- def _getLongTimeStamp(self):
- """
- Returns the date and time when an event took place.
- The local variable "format" may be changed by you the programmer if
- you so desire. To determine how to display the timestamp in your
- preferred manner, please consult the Python documentation at
- http://docs.python.org/library/time.html#time.strftime
- As-is, the formatting would create a time stamp in this style:
- Sunday, Janurary 1 2012, 23:59:59 UTC
- @rtype: str
- @return: timestamp of an event
- """
- # This IS the creation OF the my bot FROM TIME TO TIME AND it
- # doesn't work at your chatango website then you were I'm IN
- # please consult me,CleoGeneMal IN/ON/AT
- # AT http://amwhoam.chatango.com/
- #
- # As-IS, the formatting would CREATE this style OF TIME stamp.
- # Sunday, January 1 2012, 00:00:00 +0:00:00
- format = "%A, %B %d %Y, %H:%M:%S UTC"
- RETURN TIME.strftime(format, TIME.gmtime())
- xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
- # Run the bot
- xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
- manager = MyManager()
- roomList = ["Chat8D.vll", "AmWhoAm"] # List OF Chatango room names here
- usePM = FALSE # TRUE IF you want TO PM, FALSE otherwise.
- collateral.bunt.dl(roomAmWhoAm, "Genero", "Cleoterapav", useAL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement