SHOW:
|
|
- or go back to the newest paste.
1 | ############################################################################ | |
2 | ############################################################################ | |
3 | #### Getting Started Bot ############ | |
4 | #### File = ExampleBot.py ############ | |
5 | #### Originaly by = TryHardHusky ############ | |
6 | #### Edited by = 0rX ############ | |
7 | #### terus di edit lagi sama gugun :v ############ | |
8 | #### you can PM for info about making a chatango ############ | |
9 | #### bot in http://khususme.chatango.com, and you can ############ | |
10 | #### and you can also chat in : ############ | |
11 | #### http://pemakaman.chatango.com ############ | |
12 | #### Last update: ############ | |
13 | #### 3.21 AM July, 5 2015 by 0rx ############ | |
14 | ############################################################################ | |
15 | ############################################################################ | |
16 | ##Importing Random Crap xD | |
17 | #here you can see that you're importing ch library | |
18 | ||
19 | import ch | |
20 | import random | |
21 | import sys | |
22 | import json | |
23 | import time | |
24 | import re | |
25 | import urllib | |
26 | if sys.version_info[0] > 2: | |
27 | import urllib.request as urlreq | |
28 | else: | |
29 | import urllib2 as urlreq | |
30 | from time import localtime, strftime | |
31 | wordtodaytime = dict() | |
32 | ##Dance moves! | |
33 | #kinda useless | |
34 | ||
35 | cowner = ["rintoisback","thelorgorenk"]##Jangan di ubah karena lu akan melanggar UU No 2 Tentang Hak Cipta.## | |
36 | staffa = ["fapfapgangnam","sekkki"] | |
37 | dancemoves = [ | |
38 | "(>^.^)>", | |
39 | - | ##Rooms## |
39 | + | |
40 | ] | |
41 | song = [ | |
42 | "Dirimu, dirimulah! Orang yang beriku senyum ini", | |
43 | "Jika kita bisa membuat air mata yang bersinar, itu 'kan 'jadi bintang jatuh", | |
44 | "Tanganmu t'lah terluka, tapi jangan pernah lepaskannya lagi", | |
45 | "Dari langit yang terpenuhi keinginan, hari esok 'kan segera datang", | |
46 | ||
47 | "Cahya yang membimbingku adalah dirimu", | |
48 | "Dan aku pun ditarik karenanya", | |
49 | "Sebelum kusadarim kita mulai sebrangi jalan itu", | |
50 | "Sekaranglah saatnya! Jikalau kita hanya bisa bersinar di sini", | |
51 | - | #### Ranking ##### |
51 | + | |
52 | - | # 10 |
52 | + | |
53 | - | owners = ["rintoisback"] |
53 | + | bete = [ |
54 | - | nicks = ["rintoisback"] |
54 | + | "kunci", |
55 | - | # 1 |
55 | + | |
56 | - | whitelist = ["rintoisback"] |
56 | + | pagi = [ |
57 | - | # 2 |
57 | + | "ohayou oni-chan", |
58 | - | friend = ["rintoisback"] |
58 | + | |
59 | - | # 0 |
59 | + | ## Nicknames |
60 | - | blacklist = [""] |
60 | + | nicks=dict()#empty list |
61 | - | # 5 |
61 | + | f=open ("nicks.txt","r")#r=read w=right |
62 | - | mods = ["rintoisback"] |
62 | + | for line in f.readlines():#loop through eachline and read each line |
63 | - | # 8 |
63 | + | try:#try code |
64 | - | specialusers = ["rintoisback"] |
64 | + | if len(line.strip())>0:#strip the whitespace checkgreater than 0 |
65 | - | # 9 |
65 | + | user , nick = json.loads(line.strip()) |
66 | - | cowner = ["rintoisback"] |
66 | + | nicks[user] = json.dumps(nick) |
67 | - | staffa = [""] |
67 | + | except: |
68 | - | wordtodaytime = ["rintoisback"] |
68 | + | print("[Error]Can't load nick %s" % line) |
69 | f.close() | |
70 | ##Whitelist## | |
71 | - | ##Setting Pretty Colors |
71 | + | whitelist = [] |
72 | f = open("whitelist.txt", "r") # read-only | |
73 | for name in f.readlines(): | |
74 | if len(name.strip())>0: whitelist.append(name.strip()) | |
75 | f.close() | |
76 | - | self.setNameColor("F9F") |
76 | + | ##Rooms## |
77 | - | self.setFontColor("F33") |
77 | + | |
78 | - | self.setFontFace("1") |
78 | + | |
79 | - | self.setFontSize(13) |
79 | + | |
80 | time.sleep(1) | |
81 | for name in f.readlines(): | |
82 | if len(name.strip())>0: rooms.append(name.strip()) | |
83 | - | global answer |
83 | + | |
84 | - | global lockdown |
84 | + | # implied command? |
85 | # call bot name with command after | |
86 | # call bot name with command after | |
87 | #Setting Pretty Colors | |
88 | #Font setting for your bot | |
89 | def googleSearch(search): | |
90 | - | print("Connected.") |
90 | + | try: |
91 | - | if 0 == 1: |
91 | + | encoded = urllib.parse.quote(search) |
92 | - | room.message("shunstreak e aici. Rulez fara probleme.") |
92 | + | rawData = urllib.request.urlopen("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+encoded).read().decode("utf-8") |
93 | jsonData = json.loads(rawData) | |
94 | searchResults = jsonData["responseData"]["results"] | |
95 | full = [] | |
96 | val = 1 | |
97 | for data in searchResults: | |
98 | if "youtube" in data["url"]: | |
99 | - | ##### Time#### |
99 | + | data["url"] = "http://www.youtube.com/watch?v="+data["url"][35:] |
100 | - | def getUptime(): |
100 | + | full.append("[<b>%s</b>]. %s -> %s" % (val,data["title"],data['url'])) |
101 | - | # do return startTime if you just want the process start time |
101 | + | val = val + 1 |
102 | - | return time.time() - startTime |
102 | + | return '<br/>'.join(full).replace('https://','http://') |
103 | except Exception as e: | |
104 | - | def uptime(): |
104 | + | return str(e) |
105 | ||
106 | - | total_seconds = float(getUptime()) |
106 | + | def newJoi(): |
107 | headers = {} | |
108 | - | # Helper vars: |
108 | + | headers['User-Agent'] = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17" |
109 | - | MINUTE = 60 |
109 | + | req = urllib.request.Request("http://jurnalotaku.com/", headers = headers) |
110 | - | HOUR = MINUTE * 60 |
110 | + | resp = urllib.request.urlopen(req).read().decode("utf-8") |
111 | - | DAY = HOUR * 24 |
111 | + | Data = re.findall('<a href="(.*?)" class="title"><h3><span>(.*?)</span>', resp) |
112 | lolly = list() | |
113 | - | # Get the days, hours, etc: |
113 | + | anjeng = -5 |
114 | - | days = int( total_seconds / DAY ) |
114 | + | for lk, tit in Data: |
115 | - | hours = int( ( total_seconds % DAY ) / HOUR ) |
115 | + | lolly.append(('%s. <b>%s</b>: %s' % (anjeng, tit, lk))) |
116 | - | minutes = int( ( total_seconds % HOUR ) / MINUTE ) |
116 | + | anjeng = anjeng+1 |
117 | - | seconds = int( total_seconds % MINUTE ) |
117 | + | return "<br/>".join(lolly[6:14]) |
118 | ||
119 | def googleImageSearch(encoded): | |
120 | encoded = encoded.split() | |
121 | url = urllib.request.urlopen("http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s" % "+".join(encoded)) | |
122 | - | #### Comenzi fără prefix |
122 | + | udict = url.read().decode('utf-8') |
123 | jsonData = json.loads(udict) | |
124 | - | room.message("Testare efectuată cu succes!") |
124 | + | searchResults = jsonData["responseData"]["results"] |
125 | - | if message.body.startswith("shun") |
125 | + | for data in searchResults: |
126 | return "%s" % (data['url']) | |
127 | ||
128 | def tube(args): | |
129 | try: | |
130 | search = args.split() | |
131 | url = urlreq.urlopen("https://www.googleapis.com/youtube/v3/search?q=%s&part=snippet&key=AIzaSyBSnh-sIjd97_FmQVzlyGbcaYXuSt_oh84" % "+".join(search)) | |
132 | udict = url.read().decode('utf-8') | |
133 | data = json.loads(udict) | |
134 | rest = [] | |
135 | for f in data["items"]: | |
136 | rest.append(f) | |
137 | - | #### Ranking ##### |
137 | + | |
138 | - | # 10 |
138 | + | d = random.choice(rest) |
139 | - | owners = ["rintoisback"] |
139 | + | link = "http://www.youtube.com/watch?v=" + d["id"]["videoId"] |
140 | - | nicks = ["rintoisback"] |
140 | + | videoid = d["id"]["videoId"] |
141 | - | # 1 |
141 | + | title = d["snippet"]["title"] |
142 | - | whitelist = ["rintoisback"] |
142 | + | uploader = d["snippet"]["channelTitle"] |
143 | - | # 2 |
143 | + | descript = d["snippet"]['description'] |
144 | - | friend = ["rintoisback"] |
144 | + | count = d["snippet"]["publishedAt"] |
145 | - | # 0 |
145 | + | return "<br/><br/><b>%s</b>:<br/> <b>%s</b><br/><b>Upload by</b>: %s <br/><b>Description</b>: <i>%s</i>" % (title, link, uploader, descript) |
146 | - | blacklist = [""] |
146 | + | |
147 | - | # 5 |
147 | + | return str(e) |
148 | - | mods = ["rintoisback"] |
148 | + | |
149 | - | # 8 |
149 | + | def sntonick(username): |
150 | - | specialusers = ["rintoisback"] |
150 | + | user = username.lower() |
151 | - | # 9 |
151 | + | if user in nicks: |
152 | - | cowner = ["rintoisback"] |
152 | + | nick = json.loads(nicks[user]) |
153 | - | staffa = [""] |
153 | + | return nick |
154 | - | wordtodaytime = ["rintoisback"] |
154 | + | |
155 | return user | |
156 | ||
157 | - | ##Setting Pretty Colors |
157 | + | ##### Pars Def |
158 | def pars(args): | |
159 | args=args.lower() | |
160 | userlist = roomUsers() | |
161 | for name in userlist: | |
162 | - | self.setNameColor("F9F") |
162 | + | if args in name:return name |
163 | - | self.setFontColor("F33") |
163 | + | |
164 | - | self.setFontFace("1") |
164 | + | |
165 | - | self.setFontSize(13) |
165 | + | self.setNameColor("000") |
166 | self.setFontColor("FF0000") | |
167 | self.setFontFace("Arial") | |
168 | self.setFontSize(9) | |
169 | - | global answer |
169 | + | |
170 | - | global lockdown |
170 | + | |
171 | ##### Pars Def | |
172 | def pars(args): | |
173 | args=args.lower() | |
174 | userlist = roomUsers() | |
175 | for name in userlist: | |
176 | - | print("Connected.") |
176 | + | if args in name:return name |
177 | - | if 0 == 1: |
177 | + | def getAccess(self, user): |
178 | - | room.message("shunstreak e aici. Rulez fara probleme.") |
178 | + | if user.name in cowner: return 4 # owner-JP |
179 | elif user.name in staffa: return 3 # masters | |
180 | ##Connecting Crap | |
181 | #This is what will be printed on your python console when event called | |
182 | ||
183 | def onConnect(self, room): | |
184 | print("Connected") | |
185 | - | ##### Time#### |
185 | + | |
186 | - | def getUptime(): |
186 | + | |
187 | - | # do return startTime if you just want the process start time |
187 | + | |
188 | - | return time.time() - startTime |
188 | + | |
189 | def onDisconnect(self, room): | |
190 | - | def uptime(): |
190 | + | |
191 | ||
192 | - | total_seconds = float(getUptime()) |
192 | + | |
193 | ##Ignore this, you dont need to worry about this | |
194 | - | # Helper vars: |
194 | + | |
195 | - | MINUTE = 60 |
195 | + | |
196 | - | HOUR = MINUTE * 60 |
196 | + | #### Comenzi fara prefix |
197 | - | DAY = HOUR * 24 |
197 | + | |
198 | room.message("Testare efectuată cu succes!") | |
199 | - | # Get the days, hours, etc: |
199 | + | |
200 | - | days = int( total_seconds / DAY ) |
200 | + | if user.name in cowner: |
201 | - | hours = int( ( total_seconds % DAY ) / HOUR ) |
201 | + | room.message("Yea, my Master !?") |
202 | - | minutes = int( ( total_seconds % HOUR ) / MINUTE ) |
202 | + | |
203 | - | seconds = int( total_seconds % MINUTE ) |
203 | + | room.message("What's up,"+ sntonick(user.name)+"?", True) |
204 | if message.body.startswith("afk"): | |
205 | if user.name == "rintoisback": | |
206 | room.message("See You Soon Master "+sntonick(user.name), True) | |
207 | else: | |
208 | - | #### Comenzi fără prefix |
208 | + | room.message("See You Soon,"+ sntonick(user.name)+".", True) |
209 | if message.body.startswith("brb"): | |
210 | - | room.message("Testare efectuată cu succes!") |
210 | + | |
211 | room.message("Bye, Rin-Kun") | |
212 | else: | |
213 | - | room.message("Yaa Ada Apa Rin-Kun !?") |
213 | + | room.message("Bye,"+ sntonick(user.name)+".", True) |
214 | if message.body.startswith("back"): | |
215 | - | room.message("Ya Ada Apa !?,"+ user.name+"?") |
215 | + | |
216 | room.message("Welcome back,Rin-Kun") | |
217 | else: | |
218 | - | room.message("See Yaa Rin-Kun "+ user.name+".") |
218 | + | room.message("Welcome back,"+ sntonick(user.name)+".", True) |
219 | try: | |
220 | - | room.message("See Yaa,"+ user.name+".") |
220 | + | |
221 | if room.getLevel(self.user) > 0: | |
222 | print(user.name, message.body) | |
223 | else: | |
224 | print(user.name, message.body) | |
225 | - | room.message("Bye,"+ user.name+".") |
225 | + | |
226 | if message.body[0] == "~" or message.body[0] == "~" or message.body[0] == ">" or message.body[0] == "#" or message.body[0] == "^" or message.body[0] == "^" or message.body[0] == "*": ##Here is the Prefix part | |
227 | data = message.body[1:].split(" ", 1) | |
228 | if len(data) > 1: | |
229 | cmd, args = data[0], data[1] | |
230 | - | room.message("Welcome back,"+ user.name+".") |
230 | + | |
231 | cmd, args = data[0], "" | |
232 | ||
233 | if user.name not in whitelist: return | |
234 | ||
235 | if cmd == "ev" or cmd == "eval" or cmd == "e": | |
236 | ret = eval(args) | |
237 | if ret == None: | |
238 | - | if message.body[0] == "~" or message.body[0] == "/" or message.body[0] == ">" or message.body[0] == "#" or message.body[0] == "^" or message.body[0] == "^" or message.body[0] == "*": ##Here is the Prefix part |
238 | + | |
239 | return | |
240 | room.message(str(ret)) | |
241 | ##COMMANDS! | |
242 | #Setting up commands for yer bot | |
243 | #commands section | |
244 | #### Invite | |
245 | elif cmd == "wl": | |
246 | if args in whitelist: | |
247 | room.message(args+" is already registered",True);return | |
248 | elif args not in room.usernames: | |
249 | if args == "": return | |
250 | room.message("I don't see "+args+" here >,> ",True);return | |
251 | else: | |
252 | whitelist.append(args) | |
253 | room.message(args+" can use me now. :o",True) | |
254 | - | ##guess number |
254 | + | f = open("whitelist.txt", "w") |
255 | - | if cmd == "guessnum" or cmd == "gn" or cmd == "Gn" or cmd == "Guessnum": |
255 | + | f.write("\n".join(whitelist)) |
256 | - | if args == "nou": |
256 | + | f.close() |
257 | - | numbergame() |
257 | + | |
258 | - | room.message("Jocul reincepe... ;) Un alt număr a fost generat! Acum incercati să-l ghiciti..(E.x. ~gn 27)") |
258 | + | elif (cmd == "mynick") : |
259 | user=user.name.lower() | |
260 | - | if(args==answer): |
260 | + | if user in nicks : |
261 | - | room.message("DING DING DIIING ^_^ "+sntonick(user.name)+" , got it right with the number : "+args) |
261 | + | nick = json.loads(nicks[user]) |
262 | - | elif(args!=answer and answer > args ): |
262 | + | room.message(user+" is nicked : "+nick,True) |
263 | - | room.message("Mai mare! <3") |
263 | + | |
264 | - | elif(args!=answer and answer < args ): |
264 | + | room.message("You have no nickname yet in my nick[] database.", True) |
265 | - | room.message("Mai mic! <3") |
265 | + | |
266 | elif cmd == "nick": | |
267 | ## if user.name in reg or user.name in friends or user.name in trusted or user.name in owners: | |
268 | if args: | |
269 | nick = args # disini letak perbedaannya... | |
270 | user = user.name # mungkin juga disini | |
271 | nicks[user] = json.dumps(nick) | |
272 | room.message(user +' I will now call you '+str(args)+'', True) | |
273 | try: # ini skrip untuk auto-save ... | |
274 | print("[SAVING] NICKS...") | |
275 | f = open("nicks.txt", "w") | |
276 | for user in nicks: | |
277 | nick = json.loads(nicks[user]) | |
278 | f.write(json.dumps([user,nick]) + "\n") | |
279 | except: | |
280 | room.message("Failed To Make New Nick..");return | |
281 | else: | |
282 | room.message('Type ;nick yournick to adding new nickname', True) | |
283 | - | # Ban List |
283 | + | |
284 | if cmd =="nas": | |
285 | sss = args | |
286 | resp = urlreq.urlopen("http://nontonanime.web.id/?s="+sss+"&post_type=anime").read().decode("utf-8") | |
287 | data = re.findall('<h2><a href="(.*?)">(.*?)</a>', resp) | |
288 | - | ##ForceSave |
288 | + | newset = list() |
289 | num = 1 | |
290 | for link, title in data: | |
291 | newset.append(('[%s] %s: %s') % (num, title,link)) | |
292 | num = num+1 | |
293 | room.message("Search Result "+args+" on NontonAnime.web.id: <br/>"+"<br/>".join(newset),True) | |
294 | elif cmd =="staff" or cmd =="ranker" and self.getAccess(user) >= 1: | |
295 | x = ", ".join(cowner) | |
296 | z = len(cowner) | |
297 | y = ", ".join(staffa) | |
298 | o = len(staffa) | |
299 | room.message('<f x1299ffff="Arial"><b>Owner</b></f>: '+str(x).title()+" (<b>"+str(z)+"</b>)"+'<br/><f x11ff0000="Arial"><b>Staffs</b></f>: '+str(y)+" (<b>"+str(o)+"</b>)",True) | |
300 | #### Google Search | |
301 | elif cmd == "gws" or cmd == "Gws" or cmd == "Google Search": | |
302 | if len(args) > 0: | |
303 | - | ###### Define |
303 | + | room.rawMessage("<a href='http://lmgtfy.com/?q=" + args + "' target='_blank'><u>" + args + '</u></a>' ) |
304 | #### Google Image Search | |
305 | elif cmd == "gis" or cmd == "Gis" or cmd == "Google Search Image" or cmd == "GS Image": | |
306 | try: | |
307 | search = args.split() | |
308 | import urllib.request | |
309 | with urllib.request.urlopen("http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s" % "+".join(search)) as url: | |
310 | udict = url.read().decode() | |
311 | a = re.finditer('"unescapedUrl":"(.+?)","url":"', udict) | |
312 | matches = [] | |
313 | for match in a: | |
314 | match = str(match.group(1)) | |
315 | matches.append(match) | |
316 | link = random.choice(matches) | |
317 | try: | |
318 | link = link.replace("https", "http") | |
319 | except: | |
320 | print("Random choice isn't SSL.") | |
321 | if args: room.message("%s, I found: %s" % (sntonick(user.name), link), True) | |
322 | except: | |
323 | room.message("%s I'm sorry, I was unable to find anything for search term: %s :|" % (str(user.name), args), True) | |
324 | ||
325 | elif cmd == "youtube" or cmd == "yt": | |
326 | if args: | |
327 | room.message(tube(args),True) | |
328 | else: | |
329 | room.message("Please type what you want to watch in Youtube..",True) | |
330 | if cmd == "cmds": | |
331 | room.message("Shun Command : prefix [~] userlist,gis,gws,nas,nick,mynick,say,mc,mc2,myip,ban,unban,sbg,fax,bg,prof,wake,sleep,ranker,mods,lock,unlock,leave,join,isdown,sn,cs,rn,df,find,lm,bc,ig,pm,wt,save,banlist,yt") | |
332 | if cmd == "invite" or cmd == "Invite": | |
333 | if len (args) > 0: | |
334 | self.pm.message(ch.RoomManager(args),"%s You have a group invite by ! http://%s.chatango.com ." %(owners[0],room.name)) | |
335 | room.message("Invite on progress %s in Access group. :)" % args) | |
336 | else: | |
337 | room.message("Sry have problem. :3") | |
338 | ### User List | |
339 | elif cmd == "userlist" or cmd == "UserList" or cmd == "User List" or cmd == "User list": | |
340 | if args == "": | |
341 | usrs = [] | |
342 | - | #### Lag |
342 | + | |
343 | - | if cmd == "lag" or cmd == "Lag": |
343 | + | |
344 | - | lag = time.clock() - startlag |
344 | + | |
345 | - | lag1 = time.time() - message.time |
345 | + | |
346 | - | str(time.clock() - startlag) |
346 | + | |
347 | - | room.message("<b>Lag Time:</b> "+str(lag1)+"",True) |
347 | + | |
348 | - | ### Send Notes |
348 | + | |
349 | while prop >= 0: | |
350 | j = usrs[prop].replace("<User: ", "") | |
351 | i = j.replace(">", "") | |
352 | gay.append(i) | |
353 | - | if to in owners: |
353 | + | |
354 | for i in gay: | |
355 | if i not in finale: | |
356 | finale.append(i) | |
357 | if len(finale) > 40: | |
358 | room.message("<font color='#9999FF'><b>40</b></font> of <b>%s</b> users in this room: %s"% (len(finale), ", ".join(finale[:41])), True) | |
359 | if len(finale) <=40 : | |
360 | room.message("Current <b>%s</b> users of this room: %s"% (len(finale),", ".join(finale)), True) | |
361 | - | if cmd == "readnote" or cmd == "Readnote": |
361 | + | |
362 | if args not in self.roomnames: | |
363 | room.message("I'm not there.") | |
364 | return | |
365 | users = getParticipant(str(args)) | |
366 | if len(users) > 40: | |
367 | room.message("<font color='#9999FF'><b>40</b></font> of <b>%s</b> current users in <b>%s</b>: %s"% (len(users), args.title(), ", ".join(users[:41])), True) | |
368 | if len(users) <=40: | |
369 | - | #### WordToday |
369 | + | |
370 | - | if cmd =="wordtoday" or cmd=="wt": |
370 | + | ##You may want/need to evaluate something about your bot. |
371 | - | if user.name in owners: |
371 | + | if cmd == "ev" or cmd == "eval" or cmd == "e" and user.name in cowner: |
372 | ret = eval(args) | |
373 | if ret == None: | |
374 | room.message("Done.") | |
375 | return | |
376 | room.message(str(ret)) | |
377 | elif cmd == "myrank": | |
378 | if user.name in cowner:room.message(sntonick(user.name)+", your rank is Owner[<font color='#FFA600'>★★★</font>]: <b>3</b>",True) | |
379 | elif user.name in staffa: room.message(sntonick(user.name)+", your rank is Master[<font color='#FF0066'>★★</font>]: <b>2</b>",True) | |
380 | elif user.name in whitelist: room.message(sntonick(user.name)+", your rank is Whitelist[<font color='#3399FF'>★</font>]: <b>1</b>",True) | |
381 | else: room.message(sntonick(user.name)+",They Have No Rank ^^ ..",True) | |
382 | ||
383 | ##Say | |
384 | #Make your bot say what you want | |
385 | if cmd == "say": | |
386 | if args: | |
387 | room.message(args) | |
388 | else: | |
389 | room.message(":|") | |
390 | ### MultiChat | |
391 | elif cmd == "multichat" or cmd == "mc" or cmd == "MultiChat" or cmd == "Mc": | |
392 | if args == "": | |
393 | x = 'My Default room : www.desenecalumea.chatango.com' | |
394 | room.message(x,True) | |
395 | else: | |
396 | b = 'Done ! , This is your Room : <a href="http://ch.besaba.com/chat/flash/?'+args+'" target="_blank"><u><font color="#999999">Click Here!!</u></a> ' | |
397 | room.message(b,True) | |
398 | elif cmd == "multichat2" or cmd == "mc2": | |
399 | if args == "": | |
400 | - | #### Staff |
400 | + | |
401 | - | if cmd =="staff" or cmd =="ss" or cmd =="ranker": |
401 | + | |
402 | else: | |
403 | b = 'Done ! , This is your Room : <a href="http://ch.besaba.com/chat/html6/?'+args+'" target="_blank"><u><font color="#999999">Click Here!!</u></a> ' | |
404 | room.message(b,True) | |
405 | - | room.message("Owners : "+str(x).title()+" <br>Staff("+str(o)+"): "+str(y).title()+"",True) |
405 | + | #### MyIp |
406 | - | |
406 | + | |
407 | try: | |
408 | - | #### CurrentStats |
408 | + | |
409 | except: | |
410 | room.message("IP lookup failed , bot is not a mod in this chat.") | |
411 | elif cmd == "rooms": | |
412 | - | c = len(owners) |
412 | + | j = list() |
413 | for i in self.roomnames: | |
414 | j.append("<b>"+i+"</b>"+"("+str(self.getRoom(i).usercount)+")") | |
415 | room.message("|| <f x1233FFFF='1'>I'am <f x12F00='1'>Online <f x12334433='1'>in: "+", ".join(j)+" ||", True) | |
416 | ##### Set Background | |
417 | if cmd== "sbg" or cmd == "Sbg" or cmd == "Set Background": | |
418 | - | #### Random Number |
418 | + | if user.name in cowner: |
419 | - | if cmd == "RandomNumber" or cmd == "randomnumber" or cmd == "rn" or cmd == "Rn": |
419 | + | |
420 | - | room.message(random.choice(["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100"])) |
420 | + | |
421 | - | #### Eval |
421 | + | |
422 | - | if cmd == "ev" or cmd == "eval" or cmd == "e" and user.name in owners: |
422 | + | |
423 | - | lag = time.clock() - startlag |
423 | + | |
424 | - | str(time.clock() - startlag) |
424 | + | |
425 | room.setBgMode(0) | |
426 | room.message("Background Off") | |
427 | - | room.message("Done") |
427 | + | ###### Fax |
428 | if cmd == "fax" or cmd == "Fax": | |
429 | - | room.message("ANSWER : "+str(ret)+"",True) |
429 | + | |
430 | name, body = args.split(" ", 1) | |
431 | - | #### All cmds for members |
431 | + | |
432 | - | if cmd == "cmds" or cmd == "Cmds" or cmd == "CMDS": |
432 | + | |
433 | - | room.message("Nu este disponibil acum.") |
433 | + | |
434 | - | #### List Of Cmds For Staff |
434 | + | |
435 | - | if cmd =="scmds" or cmd == "acmds": |
435 | + | |
436 | - | room.message("List cmd for staff : ") |
436 | + | |
437 | except:room.message("error") | |
438 | - | #### Music Top (Neterminat) |
438 | + | |
439 | - | if cmd == "scres" or cmd == "Scres": |
439 | + | |
440 | - | room.message(random.choice(["WIZ KHALIFA FEAT. CHARLIE PUTH - SEE YOU AGAIN: https://youtu.be/RgKAFK5djSk","NICKY JAM FEAT. ENRIQUE IGLESIAS - EL PERDON: https://youtu.be/hXI8RQYC36Q","SMILEY - OARECARE: https://youtu.be/gnwlRoFoLXs","NAGUELE FEAT. ANDRA - FALAVA: https://youtu.be/073TNjLc070","DISCLOSURE - HELP ME LOSE MY MIND: https://youtu.be/1MqYtAvtv48","MAJOR LAZER FEAT.MO,DJ SNAKE - LEAN ON: https://youtu.be/YqeW9_5kURI","LOST FREQUENCIES - ARE YOU WITH ME: https://youtu.be/VjHMDlAPMUw","DAN BITTMAN - SI INGERII AU DEMONII LOR: https://youtu.be/xia2Gs6MqmM","THE WEEKND - EARNED IT_FIFTY SHADES OF GREY: https://youtu.be/waU75jdUnYw","DJ SNAKE FEAT. LIL JON - TURN DOWN FOR WHAT: https://youtu.be/HMUDVMiITOU","CARLA'S DREAMS FEAT. DELIAT MATACHE - CUM NE NOI: https://youtu.be/D8-g8CpXdO8","PETER POP FEAT. LORA - SINGURI IN DOI: https://youtu.be/pqb4I7ODTZ8","CONNECT - R FEAT. SHIFT - BAGA MARE: https://youtu.be/2SN9Z3kAc6s","","TOP15","TOP16","TOP17","TOP18","TOP19","TOP20","TOP21","TOP22","TOP23","TOP24","TOP25","TOP26","TOP27","TOP28","TOP29","TOP30","TOP31","TOP32","TOP33","TOP34","TOP35","TOP36","TOP37","TOP38","TOP39","TOP40"])) |
440 | + | |
441 | args=args.lower() | |
442 | - | #### Doresc femeie |
442 | + | |
443 | - | if cmd == "doresc" and args.startswith("femeie") or cmd == "vreau" and args.startswith("femeie"): |
443 | + | |
444 | - | room.message(random.choice(["http://linzhouweb.com/wp-content/uploads/2015/457095-anime-girl-with-pink-hair-and-headphones.jpg","https://s-media-cache-ak0.pinimg.com/736x/0d/26/0c/0d260c39d75852e64c8ed594deb03600.jpg","http://i59.tinypic.com/t8nl07.jpg","http://i1166.photobucket.com/albums/q608/Starling4anime/54351432.jpg","https://s-media-cache-ak0.pinimg.com/736x/a9/76/fc/a976fc85bfc50f238cb41e59fe2032ea.jpg","http://images4.fanpop.com/image/photos/16400000/Anime-Girls-daina-the-hedgehog-16438588-1024-768.jpg","http://www.mrwallpaper.com/wallpapers/anime-girl-flowers-field-1920x1440.jpg","http://onlyfreewallpaper.com/walls/blue-assassin-girl-wide.jpg","http://www.wallsave.com/wallpapers/1024x768/ninja-blade/518537/ninja-blade-girl-518537.jpg","https://secure.static.tumblr.com/b541803191caf08f1a8790fa44842ce3/fcbjrfp/39en2dnw4/tumblr_static_anime-girl-with-headphones-anime-hd-wallpaper-1920x1080-4277.jpg","http://animewall.net/wp-content/uploads/2015/02/anime_girl_wallpaper_download_for_pc_background.jpeg","http://www.textnovel.com/cover_images/16172/lonely-anime-girl.jpg","http://fc08.deviantart.net/fs71/f/2013/076/b/d/anime_girl_wallpaper_1366x768_by_raykorn-d5ybgz6.png","http://p1.pichost.me/i/73/1983654.jpg","http://images6.fanpop.com/image/photos/32900000/Anime-Girls-anime-32978170-960-540.jpg","http://fc01.deviantart.net/fs71/f/2013/242/9/e/anime_girls_i_have_the_hot_for_by_yukkithesweet-d6kafml.jpg","http://th08.deviantart.net/fs71/PRE/f/2012/154/4/d/anime_girl_by_arkkukakku112-d525zuc.png","https://myneverlanddotcom.files.wordpress.com/2012/02/anime-girls-anime-10342106-1024-7681.jpg","http://nd06.jxs.cz/265/646/9666c423c0_100376483_o2.jpg","http://www.hdwallpapersos.com/wp-content/uploads/2014/11/cute-wallpapers-anime-cute-wallpaper-girl-picture-hair-silver-cartoon-girls-wallpaper-39902.jpg","http://freedwallpaper.com/wp-content/uploads/2014/12/Best-top-desktop-anime-girls-wallpapers-hd-anime-girl-wallpaper-picture-image-19.jpg","http://www.angelxp.eu/galaxys4/Couleur/Manga01.jpg","http://www.wallpaperhi.com/thumbnails/detail/20130809/fairy%20tail%20anime%20anime%20girls%20swords_www.wallpaperhi.com_24.jpg","https://kazasou.files.wordpress.com/2013/04/konachan-com-122492-game_cg-green_eyes-kikouyoku_senki_ii_gin_no_toki_no_corona-moon-red_hair-short_hair-sword-weapon.jpg","http://www.gamersbin.com/attachments/f188/19376-sexy-hd-anime-wallpapers-hotsexyanimegirls8.jpg","http://i.imgur.com/WgDfW.jpg","http://cdn.playbuzz.com/cdn/d717ed0f-a98e-4bd4-8930-f53735a68b15/58c45676-c51d-40e7-8639-f6a24f9d6c4e.jpg","https://s-media-cache-ak0.pinimg.com/originals/eb/15/d1/eb15d17503b7685f1ad4e539914b2a8e.jpg","http://kaminosaber.com/wp-content/uploads/2014/07/super-cute-anime-girls-10.jpg","http://onlyfreewallpaper.com/download/purple-anime-girl-1920x1080.jpg","http://images5.fanpop.com/image/photos/24800000/Anime-Girl-anime-female-characters-24849504-1280-960.jpg","http://3.bp.blogspot.com/_TYuhq0x56sk/Sjm5ycnyzCI/AAAAAAAAARk/XZbBdM1DADs/s1600/14-782314.jpeg","http://img.powerhomepages.com/images/anime/anime_girls_on_a_beach.jpg","http://25.media.tumblr.com/5a7d26fd60d8e85a6122a7aa50ea10bd/tumblr_mu8u7ro47n1rdp5h1o1_500.jpg"])) |
444 | + | |
445 | crap, gender = stuff.split('<span class="profile_text"><strong>Gender:</strong></span></td><td><span class="profile_text">', 1) | |
446 | - | #### Spin |
446 | + | |
447 | - | if cmd == "spin" or cmd == "Spin" or cmd == "invarte" or cmd == "Invarte": |
447 | + | |
448 | - | room.message(user.name.capitalize()+" invarte sticla. S-a oprit in dreptul lui "+random.choice(room.usernames)+". ^^") |
448 | + | |
449 | elif gender == 'F': | |
450 | - | #### Dice |
450 | + | |
451 | - | if cmd == "zar" or cmd == "Zar" or cmd == "Dice" or cmd == "dice": |
451 | + | |
452 | - | dice1=random.randint(1,6) |
452 | + | |
453 | - | dice2=random.randint(1,6) |
453 | + | |
454 | - | room.message(user.name+",ai aruncat zarul si ai obtinut asta. : "+str(dice1)+" , "+str(dice2)) |
454 | + | |
455 | crap,mini=stuff.split("<span class=\"profile_text\"><!-- google_ad_section_start -->",1) | |
456 | - | #### Game Adv ori Prov. |
456 | + | |
457 | - | if cmd == "Adv sau Prov" or cmd == "adv sau prov": |
457 | + | |
458 | - | room.message("Hmmm.. Ador jocul!>.< Adevar sau Provocare?") |
458 | + | |
459 | prodata = '<br/> <a href="http://chatango.com/fullpix?' + args + '" target="_blank">' + picture + '<br/><br/> Age: '+ age + ' <br/> Gender: ' + gender + ' <br/> Location: ' + location + '' '<br/> <a href="http://' + args + '.chatango.com" target="_blank"><u>Chat With User</u></a> ' "<br/><br/> "+ mini | |
460 | - | if cmd == "adevar" or cmd == "Adevar" or cmd == "Adevăr" or cmd == "Adv." or cmd == "adv." or cmd == "adv" or cmd == "Adv": |
460 | + | |
461 | - | room.message(random.choice(["If you could trade lives with another person you know for one week who would it be?", |
461 | + | |
462 | - | "When where you embarrassed getting caught in the middle of something?", |
462 | + | |
463 | - | "Who in this chat room would be the worst to be trapped in an elevator with?", |
463 | + | #### Bg |
464 | - | "What is the longest you have gone without taking a bath or shower?", |
464 | + | |
465 | - | "What is more important than money?", |
465 | + | |
466 | - | "If you will be given a chance to become invisible for one day, what would do with this ability?", |
466 | + | |
467 | - | "Describe the strangest dream you have ever had in your life?", |
467 | + | |
468 | - | "What's your wildest fantasy?" |
468 | + | |
469 | - | "If you were to choose people from here for a threesome, who would it be?"])) |
469 | + | |
470 | except: | |
471 | - | if cmd == "provocare" or cmd == "Provocare" or cmd == "prov" or cmd == "Prov" or cmd == "prov." or cmd == "Prov.": |
471 | + | |
472 | - | room.message(random.choice(["Become the slave of another user of your choosing for 10 minutes.", |
472 | + | if cmd == "join": |
473 | - | "Poke someone you do not know on facebook. Show Proof.", |
473 | + | if args not in self.roomnames: |
474 | - | "Record a video of you singing any popular song that you know all the words to and post it to youtube.", |
474 | + | room.message("<f x12F00='1'>In proggress <f x1233FFFF='1'>go to <f x12F00='1'>room :<f x12FFCC00='1'> <b>%s</b>*" % args, True) |
475 | - | "For the rest of the day/night begin everything you say with 'All hail Queen Nefertari.'", |
475 | + | |
476 | - | "Paste the lyrics of a stupid song.", |
476 | + | room.message("<f x1233FFFF='1'>I has <f x12F00='1'>be in <f x12334433='1'>room :<f x12FFCC00='1'> "+args, True) |
477 | - | "Masturbate right now no matter where you are or who is around.", |
477 | + | else: room.message("<f x123333FF='1'>Sorry, <f x12FFCC00='1'>is seems <f x1233FFFF='1'> only rank 3,4,5 <f x12FFCC00='1'>can do this :)",True) |
478 | - | "Suck your thumb and cry like a baby.", |
478 | + | |
479 | - | "Say the words âin bedâ after everything you say for the next 5 min.", |
479 | + | |
480 | - | "Open an art program and attempt to draw a self portrait. Show proof.", |
480 | + | if user.name in cowner: return |
481 | - | "Tell us your best joke."])) |
481 | + | |
482 | - | #### Quotes |
482 | + | |
483 | - | if cmd == "citat" or cmd == "Citat": |
483 | + | |
484 | - | room.message(random.choice(["Power isn't determined by your size, but by the size of your heart and dreams.", |
484 | + | |
485 | - | "If you donât risk your life, you canât create a future. Right?", |
485 | + | if user.name in cowner: return |
486 | - | "You can't bring back what you've lost, think about what you have now.", |
486 | + | |
487 | - | "No one is born into this world to be alone.", |
487 | + | |
488 | - | "To true friendship, how long you've known each other means nothing.", |
488 | + | #### Join |
489 | - | "You want weapons? Weâre in a library! Books! The best weapons in the world!", |
489 | + | |
490 | - | "Bow ties are cool.", |
490 | + | if user.name in cowner: |
491 | - | "Dividing an impossibly large task into smaller solvable problems is a programmerâs job.", |
491 | + | |
492 | - | "Math is a language.", |
492 | + | |
493 | - | "Hold hands. That's what you're meant to do. Keep doing that... and don't let go.", |
493 | + | |
494 | - | "Be yourself; everyone else is already taken.", |
494 | + | room.message("Sunt deja acolo :|") |
495 | - | "Don't worry if plan A fails, there are 25 more letters in the alphabet.", |
495 | + | |
496 | - | "Life doesn't have any hands, but it can sure give you a slap sometimes.", |
496 | + | |
497 | - | "Hope. Hope is the only thing stronger than fear.", |
497 | + | if user.name in cowner: |
498 | - | "It's the things we love the most,that destroy us", |
498 | + | |
499 | - | "Pain has deep roots. The only way to dig it out is to forgive...", |
499 | + | |
500 | - | "Love,after all,always said more about those who felt it then it did about the ones they love.", |
500 | + | |
501 | - | "Memories are funny things.Sometimes they're real ,but other times they change into what we went them to be.", |
501 | + | |
502 | - | "The moment of impact. The moment of impact proves potential for change. Has ripples effects far beyond what we can predict. Sending some particles crashing together. Making them closer than before. While sending others spinning off into great ventures. Landing them where you've never thought you've found them. That's the thing about moments like these. You can't, no matter how hard you try, controlling how it's gonna affect you. You just gotta let the colliding part goes where they may. And wait. For the next collision."])) |
502 | + | |
503 | elif cmd == "chazerxjr": | |
504 | - | #### Da sau Nu .. Random Replic Romana |
504 | + | jawab = ["bot system kaneki v1.0 siap membantu"] |
505 | - | if cmd == "Svc" or cmd == "svc": |
505 | + | room.message(random.choice(jawab)+" @"+user.name) |
506 | - | room.message(random.choice(["Da","Nu"])) |
506 | + | elif cmd == "ramal": |
507 | jawab = ["hari ini anda beruntung","hari ini anda sial","hari ini anda akan bertemu jodoh anda :D","hari ini anda akan ketemu mantan anda","jones ya? minta di ramal2"] | |
508 | - | #### Funny |
508 | + | room.message(random.choice(jawab)+" @"+user.name) |
509 | - | if cmd == "funny" or cmd == "Funny": |
509 | + | elif cmd == "fight": |
510 | - | room.message(random.choice(["http://static.boredpanda.com/blog/wp-content/uploads/2015/03/ninja-cats-2-21__605.jpg", |
510 | + | jawab = ["http://data2.whicdn.com/images/156069110/large.gif"] |
511 | - | "http://uberhumor.com/wp-content/uploads/2015/03/e5yforz.jpg", |
511 | + | room.message(random.choice(jawab)+" @"+user.name) |
512 | - | "https://scontent-fra.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/11079607_647625022035198_3078461837081461130_n.jpg?oh=d489c2fd0cc7580f45a088ee8fbdd3d5&oe=55B1060A", |
512 | + | elif cmd == "help": |
513 | - | "http://uberhumor.com/wp-content/uploads/2015/03/TGup7sQ.jpg", |
513 | + | jawab = ["Deal"] |
514 | - | "http://i.imgur.com/YppDSSe.jpg", |
514 | + | room.message(random.choice(jawab)+" @"+user.name) |
515 | - | "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpt1/v/t34.0-12/s180x540/11091326_843639572362839_869018710_n.jpg?oh=ddfa0f5292332d165f1583a173079b79&oe=5519D867&__gda__=1427700135_823f6b008bf498273bf5a0b99da9c280", |
515 | + | elif cmd == "afk": |
516 | - | "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfa1/v/t34.0-12/11081586_843639632362833_924691807_n.jpg?oh=cc7703a81f54e39b2109b5be97f9132b&oe=5518D221&__gda__=1427688861_9c6a8873cedda4b93706a2a2e1193e3f", |
516 | + | jawab = ["terimakasih untuk chat nya hari ini"] |
517 | - | "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/s180x540/11063308_741675625946541_106159036_n.jpg?oh=696ea267c3ebd11d84279ebbee9565c4&oe=5519FF37&__gda__=1427777352_118ca3c5a006267ff06e518cc80c1eb0", |
517 | + | room.message(random.choice(jawab)+" @"+user.name) |
518 | - | "http://img-9gag-ftw.9cache.com/photo/a1e7Arw_460svwm.webm"])) |
518 | + | elif cmd == "crunch": |
519 | jawab = ["https://31.media.tumblr.com/50dcec4f797eb86ea483558695c874f1/tumblr_nqru66BNYc1u8lwqgo1_500.gif"] | |
520 | - | #### Cats |
520 | + | room.message(random.choice(jawab)+" @"+user.name) |
521 | - | if cmd == "cats" or cmd == "Cats": |
521 | + | elif cmd == "nja": |
522 | - | room.message(random.choice(["http://lovemeow.com/wp-content/uploads/2013/05/tumblr_mkzzqswXis1r4u63lo2_1280.jpg", |
522 | + | jawab = ["bye2"] |
523 | - | "http://www.pageresource.com/wallpapers/wallpaper/wild-cats-apple-mac-comic-pet-very-happy-cat_467784.jpg", |
523 | + | room.message(random.choice(jawab)+" @"+user.name) |
524 | - | "http://www.catster.com/files/post_images/bf9f08a3412a7e3dd2f09f2ea869042e.jpg", |
524 | + | elif cmd == "coeghd": |
525 | - | "http://www.3d-hdwallpaper.com//bulk_images/cat-dog-wallpaper-dowload.jpg", |
525 | + | jawab = ["anda kenapa?"] |
526 | - | "http://cdn3.vox-cdn.com/imported_assets/2236821/happy-cat.jpg", |
526 | + | room.message(random.choice(jawab)+" @"+user.name) |
527 | - | "http://www.alegoo.com/images05/animals/cats-1/024/happy-cat-07.png", |
527 | + | elif cmd == ":v": |
528 | - | "http://api.ning.com/files/3vKQkh-Flonsns93BprBPAweXlSnkss65lYwcOZYJiOUYtyTgpue3zOeIA*dmaQcWW0VUAWQKC2sM3IYVCRI0Uda6WgucP8T/happycatt.jpg", |
528 | + | jawab = ["emoticon dewa"] |
529 | - | "http://img5.visualizeus.com/thumbs/0a/07/cat,animals,cats,content,cute,happy-0a07e7e1d3e776f1d63e4aef49b29212_h.jpg", |
529 | + | room.message(random.choice(jawab)+" @"+user.name) |
530 | - | "https://s-media-cache-ak0.pinimg.com/236x/c7/8a/8f/c78a8fa4a4bf6337ae3e076deb4e83b8.jpg", |
530 | + | elif cmd == "lebaran": |
531 | - | "https://www.pixoto.com/images-photography/animals---cats/portraits/happy-cat-paws-65225632.jpg", |
531 | + | jawab = ["minal aidzin wal faizin kk"] |
532 | - | "https://stephaniepomfrett.files.wordpress.com/2013/01/happy-cat.jpg"])) |
532 | + | room.message(random.choice(jawab)+" @"+user.name) |
533 | elif cmd == "gue tamvan gak ?": | |
534 | - | #### Jokes |
534 | + | jawab = ["kaga","tamvan","jelek","biasa aja"] |
535 | - | if cmd == "jokes" or cmd == "Jokes": |
535 | + | room.message(random.choice(jawab)+" @"+user.name) |
536 | - | room.message(random.choice(["The teacher asked Jimmy, 'Why is your cat at school today Jimmy?' Jimmy replied crying, 'Because I heard my daddy tell my mommy, 'I am going to eat that pussy once Jimmy leaves for school today!'", |
536 | + | elif cmd == "hmm": |
537 | - | "A child asked his father, 'How were people born?' So his father said, 'Adam and Eve made babies, then their babies became adults and made babies, and so on.' The child then went to his mother, asked her the same question and she told him, 'We were monkeys then we evolved to become like we are now.' The child ran back to his father and said, 'You lied to me!' His father replied, 'No, your mom was talking about her side of the family.'", |
537 | + | jawab = ["maho detcted"] |
538 | - | "Do not be racist; be like Mario. He's an Italian plumber, who was made by the Japanese, speaks English, looks like a Mexican, jumps like a black man, and grabs coins like a Jew!", |
538 | + | room.message(random.choice(jawab)+" @"+user.name) |
539 | - | "Roses are red. Your blood is too. You look like a monkey. And belong in a zoo. Do not worry, I'll be there too. Not in the cage, But laughing at you.", |
539 | + | elif cmd == "konbanwa": |
540 | - | "A blonde, a redhead, and a brunette were all lost in the desert. They found a lamp and rubbed it. A genie popped out and granted them each one wish. The redhead wished to be back home. Poof! She was back home. The brunette wished to be at home with her family. Poof! She was back home with her family. The blonde said, 'Awwww, I wish my friends were here.'"])) |
540 | + | jawab = ["tidur sana jangan ngalong :v"] |
541 | room.message(random.choice(jawab)+" @"+user.name) | |
542 | - | #### Response |
542 | + | elif cmd == "naruto": |
543 | - | if cmd == "response" or cmd == "Response" or cmd == "Rsp": |
543 | + | jawab = ["adalah anime yang selalu flash back"] |
544 | - | room.message(random.choice(["Yes.","Indeed.","No.","No way.","Not in a million years","Possibly.","Not sure","Hell yes.","Hell no.","I'm afraid you're right.","I'm afraid you're wrong.","Not sure what to say.","Repeat the question , please.","Definetely.","Definetely not.","Of course.","Oh my master , no."])) |
544 | + | room.message(random.choice(jawab)+" @"+user.name) |
545 | - | #### Parkour |
545 | + | elif cmd == "bnp": |
546 | - | if cmd == "parkour" or cmd == "Parkour" or cmd == "Prk": |
546 | + | jawab = ["erorr forbidden access denied"] |
547 | - | room.message(random.choice(["http://canal3.md/media/2015/05/parkour.jpg","http://grapeshotmq.com.au/wp-content/uploads/2015/03/Parkour-Luxembourg4.jpg","http://www.circephoto.com/data/photos/372_1parkour_7.jpg","http://www.flowacademy.co.nz/wp-content/uploads/2014/03/sfondo-parkour-1280x800.jpg","http://www.isfsports.org/wp-content/uploads/2015/05/pb-120912-palestinian-parkour-jsa-2photoblog900-2190054.jpeg","http://www.aljazeera.com/mritems/images/2014/3/2/201432125141986945_8.jpg","http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/pb-120912-palestinian-parkour-jsa-1.photoblog900.jpg","http://guildlocal.com/wp-content/uploads/2013/02/Parkour-Crop.jpg","http://upload.wikimedia.org/wikipedia/commons/c/c2/Team_JiYo_-_pioneerne_indenfor_parkour_i_danmark.jpg","http://i.ytimg.com/vi/Qc03qBkh2Do/maxresdefault.jpg","http://www.adamdunlap.com/blog/wp-content/uploads/2014/02/parkour_olympics_david_belle_adam_dunlap.jpg"])) |
547 | + | room.message(random.choice(jawab)+" @"+user.name) |
548 | - | ######################################################################################################################################################################### |
548 | + | |
549 | - | #### Slap |
549 | + | |
550 | - | elif cmd == "slap" or cmd == "Slap": |
550 | + | if cmd == "randomuser": |
551 | - | if not args == "": |
551 | + | |
552 | - | if args in owners: |
552 | + | |
553 | - | room.message("No I'm not going to slap my owner! No way!") |
553 | + | |
554 | - | else: |
554 | + | |
555 | - | room.message("*Slaps "+args+" till death* :@") |
555 | + | elif cmd == "mylvl": |
556 | - | else: |
556 | + | |
557 | - | room.message(user.name.capitalize()+", WTF am I supposed to slap! O.o") |
557 | + | |
558 | - | #### Shoot |
558 | + | ##List Mods |
559 | - | elif cmd == "shoot" or cmd == "Shoot": |
559 | + | #List of Mods and Owner name in the current room you're in |
560 | - | if not args == "": |
560 | + | |
561 | - | if args in owners: |
561 | + | |
562 | - | room.message("Owner shot! Acum cine va fi ownerul meu?") |
562 | + | |
563 | - | else: |
563 | + | |
564 | - | room.message("*Shots "+args+" pana cand vine politia * :@") |
564 | + | |
565 | - | else: |
565 | + | |
566 | - | room.message(user.name.capitalize()+", WTF Chiar trebuie să fac asta? O.o") |
566 | + | |
567 | - | #### Kick |
567 | + | |
568 | - | elif cmd == "kick" or cmd == "Kick": |
568 | + | |
569 | - | if not args == "": |
569 | + | |
570 | - | if args in owners: |
570 | + | |
571 | - | room.message("Owner a fugit prea repede! Nu am putut să-l dau afară.") |
571 | + | |
572 | - | else: |
572 | + | |
573 | - | room.message("*Kicks "+args+" 's balls pana "+args+" plange* :@") |
573 | + | |
574 | - | else: |
574 | + | |
575 | - | room.message(user.name.capitalize()+", Pe cine trebuie să dau afară? :|") |
575 | + | |
576 | - | #### Cookie |
576 | + | |
577 | - | elif cmd =="cookie" or cmd == "Cookie": |
577 | + | |
578 | - | room.message(random.choice(["Oh Yeah! Cookie! :3 " , "Suure. ^^" , "O_O Gimme dat right meow." , "Cookie?...YESH" , "Cookie Monster!" , "*noms the cookie* ~thaanks~",])) |
578 | + | |
579 | a = re.finditer('"unescapedUrl":"(.+?)","url":"', udict) | |
580 | - | #### Give ME |
580 | + | |
581 | - | elif cmd == "giveme" or cmd == "Giveme" or cmd == "GiveMe": |
581 | + | |
582 | - | room.message("Aici esti tu! *gives "+user.name.capitalize()+" "+args+"*") |
582 | + | |
583 | matches.append(match) | |
584 | - | #### Gender |
584 | + | |
585 | - | elif cmd =="gender" or cmd == "Gen" or cmd == "Gender" or cmd == "gen": |
585 | + | |
586 | - | room.message("Deci, esti curios... In fine... Sunt fată. Asta a fost dorinta Lordului Meu <3.") |
586 | + | |
587 | except: | |
588 | - | #### Announcements |
588 | + | |
589 | - | elif cmd == "Anunt" or cmd == "anunt": |
589 | + | |
590 | - | if user.name.lower() in owners: |
590 | + | |
591 | room.message("%s I'm sorry, I was unable to find anything for search term: %s :|" % (str(user.name), args), True) | |
592 | - | room.message("[ANUNT]: Anunt foarte important de la "+user.name.title()+" : "+args) |
592 | + | |
593 | - | room.message("http://i.imgur.com/jE6Jkok.png") |
593 | + | #### Broadcast |
594 | if cmd == "broadcast" or cmd == "Broadcast" or cmd == "Shout" or cmd == "shout" or cmd == "Bc" or cmd == "Bc": | |
595 | - | room.message("Nu ai permisiunea de a efectua asta. ") |
595 | + | if user.name in cowner: #Only rank 4+ can Broadcast a Message |
596 | - | #### Events |
596 | + | |
597 | - | elif cmd == "event" or cmd == "Event": |
597 | + | |
598 | - | if user.name.lower() in owners: |
598 | + | |
599 | room.message("Broadcast de la - "+user.name + ": "+args, True) | |
600 | - | room.message("[Event]: Se anunta un eveniment : "+args) |
600 | + | |
601 | - | room.message("http://i.imgur.com/jE6Jkok.png") |
601 | + | |
602 | #### Is Down | |
603 | - | room.message("Nu ai permisiunea de a efectua asta. ") |
603 | + | |
604 | if len(args)>0: | |
605 | - | #### Reverse |
605 | + | |
606 | - | elif cmd == "reverse" or cmd == "Reverse": |
606 | + | |
607 | - | rev = str(args[::-1]) |
607 | + | |
608 | - | room.message(rev) |
608 | + | |
609 | - | #### Profile picture |
609 | + | |
610 | - | elif cmd == "pfpic" or cmd == "PfPic": |
610 | + | |
611 | - | link = "http://fp.chatango.com/profileimg/%s/%s/%s/full.jpg" % (args[0], args[1], args) |
611 | + | |
612 | - | room.message(link) |
612 | + | |
613 | - | #### Info / Help |
613 | + | |
614 | - | elif cmd == "info" or cmd == "Info": |
614 | + | |
615 | - | room.message("Numele meu este shunstreak. Am fost creata de Lordul rintoisback pentru a distra useri ca tine. :)") |
615 | + | |
616 | else: | |
617 | - | elif cmd == "help" or cmd == "Help": |
617 | + | |
618 | - | room.message("Pentru a afla ce pot face eu, scrie >~Cmds<. ;)") |
618 | + | # Ban List |
619 | - | |
619 | + | |
620 | room.message("The banlist is: "+str(room.banlist)) | |
621 | - | #### Restart |
621 | + | |
622 | ##ForceSave | |
623 | - | if user.name.lower() in owners: |
623 | + | |
624 | time.sleep(1) | |
625 | print("[SAVE] SAVING DEFINITIONS...") | |
626 | f = open("definitions.txt", "w") | |
627 | for word in dictionary: | |
628 | definition, name = json.loads(dictionary[word]) | |
629 | - | if user.name in owners: |
629 | + | |
630 | if user.name.lower() in owners or user.name in cowner: | |
631 | room.message("Se salveaza...(Force Mode!)...") | |
632 | else: | |
633 | room.message("Se salveaza...(Normal Mode!)") | |
634 | f.close() | |
635 | - | #### Join |
635 | + | |
636 | ###### Define | |
637 | - | if user.name in owners: |
637 | + | |
638 | try: | |
639 | try: | |
640 | word, definition = args.split(":", 1) | |
641 | - | room.message("Sunt deja acolo :|") |
641 | + | |
642 | - | #### Spam |
642 | + | |
643 | - | elif cmd == "spam" or cmd == "Spam": |
643 | + | |
644 | - | room.message("Uite aici niste spam pentru tine, "+user.name.capitalize()+". ;)") |
644 | + | |
645 | - | room.message("http://i.imgur.com/6eJQw.gif") |
645 | + | |
646 | - | #### Recognize |
646 | + | |
647 | - | elif cmd == "rec" or cmd == "Recognize" or cmd == "Rec" or cmd == "recognize": |
647 | + | |
648 | - | if args == "25194 commands": |
648 | + | |
649 | - | room.message("Access granted.") |
649 | + | |
650 | - | file13 = open("cmds.txt", "r") |
650 | + | |
651 | - | room.message(file13.read()) |
651 | + | |
652 | - | file13.close() |
652 | + | |
653 | - | elif args == "25194": |
653 | + | |
654 | - | room.message("Acces granted.") |
654 | + | |
655 | - | room.message("Hi there , "+user.name.capitalize()+". :3") |
655 | + | |
656 | room.message("Nu ai permisiunea sa folosesti asta.") | |
657 | - | room.message("Access denied.") |
657 | + | |
658 | - | #### Scuze |
658 | + | |
659 | - | elif cmd == "scuze" or cmd == "scz" or cmd == "Scuze" or cmd == "Scz": |
659 | + | |
660 | - | room.message("Iti accept scuzele si te voi tine minte. :)") |
660 | + | |
661 | - | file = open("sorry.txt", "a") |
661 | + | |
662 | - | file.write(" "+user.name.capitalize()+". ,") |
662 | + | |
663 | - | file.close() |
663 | + | |
664 | - | #### Invite |
664 | + | |
665 | room.message(word + " a fost definit astfel:" + definition) | |
666 | else: | |
667 | - | self.pm.message(ch.RoomManager(args),"%s vrea sa i te alaturi intr-un chatroom! http://%s.chatango.com ." %(owners[0],room.name)) |
667 | + | |
668 | - | room.message("Am invitat pe %s in acest grup. :)" % args) |
668 | + | |
669 | room.message(word + " a fost definit astfel: " + definition) | |
670 | - | room.message("Spune-mi pe cine sa invit.") |
670 | + | |
671 | room.message("<b>%s</b> nu este inca definit. Poti sa il definesti chiar acum scriind urmatoarele: <b> /def %s: definitie*</b> " % (args, args), True) | |
672 | - | ###################################################################### Comenzi Setate ########################################################################################## |
672 | + | |
673 | room.message("Oh , nu! Ai gresit. Incearca din nou.") | |
674 | #### ReadNotes | |
675 | - | if cmd == "say" or cmd == "Say" or cmd == "Spune" or cmd == "spune": |
675 | + | if cmd == "readnote" or cmd == "rn": |
676 | try: | |
677 | if user.name in sasaran: | |
678 | body, sender = json.loads(sasaran[user.name]) | |
679 | room.message(user.name+", ai o notită nouă de la "+sender+" ---> "+body) | |
680 | - | if cmd == "randomuser" or cmd == "RandomUser" or cmd == "ru" or cmd == "Ru": |
680 | + | |
681 | notif.remove(to) | |
682 | except: return | |
683 | #### CurrentStats | |
684 | if cmd == "cs" or cmd =="currentstats": | |
685 | - | elif cmd == "mylvl" or cmd == "MyLvl" or cmd == "MyLevel" or cmd == "mylevel": |
685 | + | |
686 | b = len(whitelist) | |
687 | c = len(cowner) | |
688 | d = len(whitelist) | |
689 | - | #Dance Of Course !!! ^_^ |
689 | + | |
690 | - | elif cmd == "dance" or cmd == "Dance": |
690 | + | |
691 | g = len(blacklist) | |
692 | room.message("<br><br>Rooms: "+str(a)+" <br>Whitelist: "+str(b)+" <br>Player: "+str(c)+" <br>Definitions: "+str(d)+" <br>Nick: "+str(e)+" <br>Staffbot: "+str(f)+" <br>Cash: "+str(g)+"",True) | |
693 | - | |
693 | + | ### Send Notes |
694 | if cmd == "sn" or cmd == "sendnote" or cmd == "Sn" or cmd == "Sendnote": | |
695 | try: | |
696 | - | elif cmd == "ismod" or cmd == "IsMod" or cmd == "Ismod": |
696 | + | |
697 | - | if args: |
697 | + | |
698 | - | if room.getLevel(ch.User(args)) > 0: |
698 | + | if to in cowner: |
699 | - | room.message(args + " is a Mod") |
699 | + | |
700 | room.message("Trimis!") | |
701 | - | room.message(args + " is not a Mod") |
701 | + | |
702 | - | if args == "": |
702 | + | |
703 | - | if room.getLevel(user.name) > 0: |
703 | + | |
704 | - | room.message(user.name + " is a Mod") |
704 | + | |
705 | #### Ban / Unban | |
706 | - | room.message(user.name + " is not a Mod") |
706 | + | |
707 | - | ##### Active/Deactive #### |
707 | + | if user.name in cowner: |
708 | name = args | |
709 | if user.name in cowner: | |
710 | - | if user.name in owners: return |
710 | + | |
711 | return | |
712 | if name in room.usernames: | |
713 | room.banUser(ch.User(name)) | |
714 | room.message("<b>%s</b> is banned" % (name), True) | |
715 | - | if user.name in owners: return |
715 | + | |
716 | else: | |
717 | room.message("i don't see "+name+" here :|") | |
718 | - | ### Lock/Unlock |
718 | + | |
719 | room.message("You mere mortals can never do that !!") | |
720 | - | if user.name in owners: |
720 | + | |
721 | elif cmd == "unban" or cmd == "ub" or cmd == "UnBan" or cmd == "Unban" or cmd == "Scoate Interzicerea" or cmd == "Scoate interzicerea": | |
722 | if user.name in cowner: | |
723 | name = args | |
724 | if user.name in cowner: return | |
725 | room.unban(ch.User(name)) | |
726 | room.message("<b>%s</b> is unbanned" % (name), True) | |
727 | self.pm.message(ch.User(name.lower()), "You have been unbanned from %s by %s. Please behave lik a Punk!!" % (room.name, user.name)) | |
728 | - | if user.name in owners: |
728 | + | |
729 | room.message("You mere mortals can never do that !!") | |
730 | #### Restart | |
731 | elif cmd =="restart" or cmd == "Restart" or cmd == "Reconnect" or cmd == "reconnect": | |
732 | if user.name.lower() in cowner: | |
733 | room.reconnect() | |
734 | else: | |
735 | room.message("Ce ??? *lol*") | |
736 | #### Find | |
737 | elif cmd == "find" or cmd == "Find": | |
738 | name = args.split()[0].lower() | |
739 | try: | |
740 | if name in room.usernames: | |
741 | if not ch.User(name).roomnames: room.message("dont see them. <_<") | |
742 | else: room.message("%s is curently in <b>%s</b> >_>" % (args, ", ".join(ch.User(name).roomnames)), True) | |
743 | except: return | |
744 | - | if user.name in owners: return |
744 | + | |
745 | if args[0] == "+": | |
746 | if not ch.User(target).roomnames: room.message("dont see them. <_<") | |
747 | - | if user.name in owners: |
747 | + | |
748 | elif args == "true love" or args == "True Love" or args == "True love": | |
749 | orang = random.choice(room.usernames) | |
750 | room.message(random.choice([user.name+", You just found out that "+orang+" is your true love :o","I'm sorry "+user.name+" You didn't found your true love here :(",user.name+"'s true love is "+orang+", Have fun you godamn lovebirds !! ^^","Njet >_> ,, No love for you !","Shut up >_> ,, I love you since we first met !"])) | |
751 | ||
752 | #### LoveMeter | |
753 | elif cmd == "lovemeter" or cmd == "lm" or cmd == "LoveMeter" or cmd == "Love Meter" or cmd == "Lovem": | |
754 | try: | |
755 | user2, user3 = args.split(" and ", 1) | |
756 | moter = random.randint(6,100) | |
757 | try: | |
758 | user1 = args.lower() | |
759 | if user1 in lomet: | |
760 | meter = json.loads(lomet[user1]) | |
761 | meter = str(meter) | |
762 | room.message("I Gaze upon the stars... *Closes my eyes and concentrates*. And again, <b>%s</b> and <b>%s</b>, their love meter is <b>%s</b>%s ,, that is the answer of fate ;)" % (user2, user3, str(meter), "%"), True) | |
763 | else: | |
764 | moter = str(moter) | |
765 | - | ##---------------------------------FUTURE---------------------------------## |
765 | + | |
766 | room.message("I Gaze upon the stars... *Closes my eyes and concentrates*. Gotcha, <b>%s</b> and <b>%s</b>, their love meter is <b>%s</b>%s ,, that is the answer of fate ;)" % (user2, user3, moter, "%"), True) | |
767 | except: | |
768 | - | ###### Call the bot |
768 | + | |
769 | - | if "shunstreak" == message.body.lower() or "kurotsuno" == message.body.lower() or "kuro" == message.body.lower(): |
769 | + | |
770 | - | if user.name == "rintoisback": |
770 | + | |
771 | - | room.message("yes, Rin-Kun?") |
771 | + | |
772 | #### Seen | |
773 | - | room.message("What's up "+sntonick(user.name)+" ?", True) |
773 | + | elif cmd == "invitegroup" or cmd == "ig": |
774 | if len (args) > 0: | |
775 | - | if "hi" == message.body.lower(): |
775 | + | self.pm.message(ch.RoomManager(args),"%s You have group invite! check this Chatango Group http://%s.chatango.com ." %(room.ownername[0],room.name)) |
776 | - | room.message("Hi~ ! :)") |
776 | + | room.message("Youre invite %s now is in Accest Group. :)" % args) |
777 | - | if "<><" == message.body.lower(): |
777 | + | |
778 | - | room.message("Pfft, that's a gay fish !") |
778 | + | room.message("gak mau ah nginvite dia") |
779 | - | if message.body.lower().startswith("afk"): |
779 | + | ### Lock/Unlock |
780 | - | if user.name in "rintoisback": |
780 | + | |
781 | - | room.message("See you Lord Creator!") |
781 | + | if user.name in cowner: |
782 | room.message("LOCKED!") | |
783 | - | room.message("See you soon "+sntonick(user.name)+"!", True) |
783 | + | |
784 | - | if "brb" in message.body.lower(): |
784 | + | |
785 | - | if user.name == "rintoisback": |
785 | + | |
786 | - | room.message("See you soon Lord Creator!") |
786 | + | |
787 | return | |
788 | - | room.message("See you soon "+sntonick(user.name)+" !", True) |
788 | + | |
789 | - | if "back" == message.body.lower(): |
789 | + | if user.name in cowner: |
790 | - | if user.name == "rintoisback": |
790 | + | |
791 | - | room.message("Wellcome back Lord Creator!") |
791 | + | |
792 | else: room.message("Only rank 3 gets to lock rooms remotely") | |
793 | - | room.message("Wellcome back "+sntonick(user.name)+" !", True) |
793 | + | |
794 | - | if "pagi" == message.body.lower(): |
794 | + | |
795 | - | room.message("Selamat pagi~ ! :)") |
795 | + | |
796 | - | if "morning" == message.body.lower(): |
796 | + | |
797 | - | if user.name == "rintoisback": |
797 | + | |
798 | - | room.message("Good Morning Lord Creator !") |
798 | + | |
799 | if args not in self.roomnames: | |
800 | - | room.message("Good Morning %s !" % sntonick(user.name), True) |
800 | + | |
801 | - | ##### End Call The Bot##### |
801 | + | |
802 | return | |
803 | ||
804 | if cmd == "unlock" or cmd == "UnLock" or cmd == "Unlock": | |
805 | if user.name in cowner: return | |
806 | if args in self.roomnames: | |
807 | if args in locks: | |
808 | if user.name in cowner: | |
809 | locks.remove(args) | |
810 | room.message("unlocked <b>%s</b>" % args, True) | |
811 | else: room.message("Only rank 3 gets to unlock rooms remotely") | |
812 | else: | |
813 | room.message("It's not even locked") | |
814 | return | |
815 | if args == "": | |
816 | if room.name in locks: | |
817 | locks.remove(room.name) | |
818 | room.message("unlocked <b>%s</b>" % room.name, True) | |
819 | - | if user.name in owners: |
819 | + | |
820 | room.message("It's not even locked") | |
821 | return | |
822 | if args not in self.roomnames: | |
823 | if args == "": return | |
824 | room.message("I'm not in that room") | |
825 | return | |
826 | ##DANCE!!!! | |
827 | #Dance ? Of Course !!! ^_^ | |
828 | - | ###### Fax |
828 | + | elif cmd == "dance": |
829 | for i, msg in enumerate(dancemoves): | |
830 | self.setTimeout(i / 2, room.message, msg) | |
831 | #### Pm | |
832 | elif cmd == "pm" or cmd == "Pm" or cmd == "PM" or cmd == "Private Message": | |
833 | data = args.split(" ", 1) | |
834 | if len(data) > 1: | |
835 | name , args = data[0], data[1] | |
836 | self.pm.message(ch.User(name), "[Private.Message] By - "+user.name+" : "+args+" ") | |
837 | room.message("Has been sent to "+name+"") | |
838 | #### Invite | |
839 | elif cmd == "invite" or cmd == "Invite": | |
840 | if len (args) > 0: | |
841 | self.pm.message(ch.RoomManager(args),"%s You have a group invite by ! http://%s.chatango.com ." %(owners[0],room.name)) | |
842 | room.message("Invite on progress %s in Access group. :)" % args) | |
843 | else: | |
844 | room.message("Sry have problem. :3") | |
845 | #### Profile | |
846 | elif cmd == "prof" or cmd == "profile" or cmd == "Prof" or cmd == "Profile": | |
847 | try: | |
848 | args=args.lower() | |
849 | stuff=str(urlreq.urlopen("http://"+args+".chatango.com").read().decode("utf-8")) | |
850 | crap, age = stuff.split('<span class="profile_text"><strong>Age:</strong></span></td><td><span class="profile_text">', 1) | |
851 | age, crap = age.split('<br /></span>', 1) | |
852 | crap, gender = stuff.split('<span class="profile_text"><strong>Gender:</strong></span></td><td><span class="profile_text">', 1) | |
853 | gender, crap = gender.split(' <br /></span>', 1) | |
854 | if gender == 'M': | |
855 | gender = 'Male' | |
856 | elif gender == 'F': | |
857 | gender = 'Female' | |
858 | else: | |
859 | gender = '?' | |
860 | crap, location = stuff.split('<span class="profile_text"><strong>Location:</strong></span></td><td><span class="profile_text">', 1) | |
861 | location, crap = location.split(' <br /></span>', 1) | |
862 | crap,mini=stuff.split("<span class=\"profile_text\"><!-- google_ad_section_start -->",1) | |
863 | mini,crap=mini.split("<!-- google_ad_section_end --></span>",1) | |
864 | - | #### Bg |
864 | + | |
865 | picture = '<a href="http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg" style="z-index:59" target="_blank">http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg</a>' | |
866 | prodata = '<br/> <a href="http://chatango.com/fullpix?' + args + '" target="_blank">' + picture + '<br/><br/> Age: '+ age + ' <br/> Gender: ' + gender + ' <br/> Location: ' + location + '' '<br/> <a href="http://' + args + '.chatango.com" target="_blank"><u>Chat With User</u></a> ' "<br/><br/> "+ mini | |
867 | room.message(prodata,True) | |
868 | except: | |
869 | room.message(""+args+" doesn't exist o.o ") | |
870 | # | |
871 | if cmd =="wordtoday" or cmd=="wt": | |
872 | if user.name in cowner: | |
873 | - | #### Pm |
873 | + | |
874 | w = json.loads(wordtodaytime[user.name]) | |
875 | if time.time() < w: | |
876 | w = int(w) - int(time.time()) | |
877 | minute = 60 | |
878 | hour = minute * 60 | |
879 | - | room.message("Trimis la "+name+"") |
879 | + | |
880 | - | #### MyIp |
880 | + | |
881 | hours = int((w % day) / hour) | |
882 | minutes = int((w % hour) / minute) | |
883 | seconds = int(w % minute) | |
884 | string = "" | |
885 | if days > 0: | |
886 | - | #### Rooms |
886 | + | |
887 | - | elif cmd == "rooms" or cmd == "Rooms": |
887 | + | |
888 | - | j = [] |
888 | + | |
889 | - | for i in self.roomnames: |
889 | + | |
890 | - | j.append(i+'[%s]' % str(self.getRoom(i).usercount)) |
890 | + | |
891 | - | j.sort() |
891 | + | |
892 | - | room.message("I'm Playing In "+'[%s] rooms: '%(len(self.roomnames))+", ".join(j)) |
892 | + | |
893 | - | #### User Count |
893 | + | |
894 | - | elif cmd == "count" or cmd == "Count": |
894 | + | |
895 | - | room.message("I see: <font color='#9999FF'><b>"+str(room.usercount)+"</b></font>",True) |
895 | + | |
896 | - | ### User List |
896 | + | |
897 | wordtodaytime[user.name] = json.dumps(time.time()+1200) | |
898 | ||
899 | ##Check if Mod | |
900 | #not really important | |
901 | elif cmd == "ismod": | |
902 | user = ch.User(args) | |
903 | if room.getLevel(user) > 0: | |
904 | room.message("yesh") | |
905 | else: | |
906 | room.message("nope") | |
907 | except Exception as e: | |
908 | try: | |
909 | et, ev, tb = sys.exc_info() | |
910 | lineno = tb.tb_lineno | |
911 | fn = tb.tb_frame.f_code.co_filename | |
912 | room.message("[Expectation Failed] %s Line %i - %s"% (fn, lineno, str(e))) | |
913 | return | |
914 | except: | |
915 | room.message("Undescribeable error detected !!") | |
916 | return | |
917 | ||
918 | ##Other Crap here, Dont worry about it | |
919 | ||
920 | def onFloodWarning(self, room): | |
921 | room.reconnect() | |
922 | ||
923 | def onJoin(self, room, user): | |
924 | print(user.name + " joined the chat!") | |
925 | ||
926 | def onLeave(self, room, user): | |
927 | print(user.name + " left the chat!") | |
928 | - | #### Mods |
928 | + | |
929 | def onUserCountChange(self, room): | |
930 | print("users: " + str(room.usercount)) | |
931 | ||
932 | def onMessageDelete(self, room, user, msg): | |
933 | print("MESSAGE DELETED: " + user.name + ": " + msg.body) | |
934 | ||
935 | ||
936 | if __name__ == "__main__": TestBot.easy_start(rooms,"ShunStreak","*1*2*3*4*5") | |
937 | ||
938 | #The End!! |