View difference between Paste ID: 8KxvEYRr and 7T97yJ4N
SHOW: | | - or go back to the newest paste.
1
/**
2
	 * Dev commands
3
	 *
4
	 * These commands are here for highly ranked users (or the creator) to use
5
	 * to perform arbitrary actions that can't be done through any other commands
6
	 * or to help with upkeep of the bot.
7
	 */
8
9
	reload: function(arg, by, room, con) {
10
		if (!this.hasRank(by, '@#~')) return false;
11
		try {
12
			this.uncacheTree('./commands.js');
13
			Commands = require('./commands.js').commands;
14
			this.say(con, room, 'Commands reloaded.');
15
		} catch (e) {
16
			error('failed to reload: ' + sys.inspect(e));
17
		}
18
	},
19
	custom: function(arg, by, room, con) {
20
		if (!this.hasRank(by, '~#@%')) return false;
21
		// Custom commands can be executed in an arbitrary room using the syntax
22
		// ".custom [room] command", e.g., to do !data pikachu in the room lobby,
23
		// the command would be ".custom [lobby] !data pikachu". However, using
24
		// "[" and "]" in the custom command to be executed can mess this up, so
25
		// be careful with them.
26
		if (arg.indexOf('[') === 0 && arg.indexOf(']') > -1) {
27
			var tarRoom = arg.slice(1, arg.indexOf(']'));
28
			arg = arg.substr(arg.indexOf(']') + 1).trim();
29
		}
30
		this.say(con, tarRoom || room, arg);
31
	},
32
	js: function(arg, by, room, con) {
33
		if (config.excepts.indexOf(toId(by)) === -1) return false;
34
		try {
35
			var result = eval(arg.trim());
36
			this.say(con, room, JSON.stringify(result));
37
		} catch (e) {
38
			this.say(con, room, e.name + ": " + e.message);
39
		}
40
	},
41
42
	/**
43
	 * Room Owner commands
44
	 *
45
	 * These commands allow room owners to personalise settings for moderation and command use.
46
	 */
47
48
	settings: 'set',
49
	set: function(arg, by, room, con) {
50
		if (!this.hasRank(by, '%@&#~') || room.charAt(0) === ',') return true;
51
52
		var settable = {
53
			say: 1,
54
			joke: 1,
55
			choose: 1,
56
			usagestats: 1,
57
			buzz: 1,
58
			helix: 1,
59
			survivor: 1,
60
			games: 1,
61
			wifi: 1,
62
			monotype: 1,
63
			autoban: 1,
64
			happy: 1,
65
			guia: 1,
66
			studio: 1,
67
			'switch': 1,
68
			banword: 1
69
		};
70
		var modOpts = {
71
			flooding: 1,
72
			caps: 1,
73
			stretching: 1,
74
			bannedwords: 1,
75
			snen: 1
76
		};
77
78
		var opts = arg.split(',');
79
		var cmd = toId(opts[0]);
80
		if (cmd === 'mod' || cmd === 'm' || cmd === 'modding') {
81
			if (!opts[1] || !toId(opts[1]) || !(toId(opts[1]) in modOpts)) return this.say(con, room, 'Incorrect command: correct syntax is ' + config.commandcharacter + 'set mod, [' +
82
				Object.keys(modOpts).join('/') + '](, [on/off])');
83
84
			if (!this.settings['modding']) this.settings['modding'] = {};
85
			if (!this.settings['modding'][room]) this.settings['modding'][room] = {};
86
			if (opts[2] && toId(opts[2])) {
87
				if (!this.hasRank(by, '#~')) return false;
88
				if (!(toId(opts[2]) in {on: 1, off: 1}))  return this.say(con, room, 'Incorrect command: correct syntax is ' + config.commandcharacter + 'set mod, [' +
89
					Object.keys(modOpts).join('/') + '](, [on/off])');
90
				if (toId(opts[2]) === 'off') {
91
					this.settings['modding'][room][toId(opts[1])] = 0;
92
				} else {
93
					delete this.settings['modding'][room][toId(opts[1])];
94
				}
95
				this.writeSettings();
96
				this.say(con, room, 'Moderation for ' + toId(opts[1]) + ' in this room is now ' + toId(opts[2]).toUpperCase() + '.');
97
				return;
98
			} else {
99
				this.say(con, room, 'Moderation for ' + toId(opts[1]) + ' in this room is currently ' +
100
					(this.settings['modding'][room][toId(opts[1])] === 0 ? 'OFF' : 'ON') + '.');
101
				return;
102
			}
103
		} else {
104
			if (!Commands[cmd]) return this.say(con, room, config.commandcharacter + '' + opts[0] + ' is not a valid command.');
105
			var failsafe = 0;
106
			while (!(cmd in settable)) {
107
				if (typeof Commands[cmd] === 'string') {
108
					cmd = Commands[cmd];
109
				} else if (typeof Commands[cmd] === 'function') {
110
					if (cmd in settable) {
111
						break;
112
					} else {
113
						this.say(con, room, 'The settings for ' + config.commandcharacter + '' + opts[0] + ' cannot be changed.');
114
						return;
115
					}
116
				} else {
117
					this.say(con, room, 'Something went wrong. PM TalkTakesTime here or on Smogon with the command you tried.');
118
					return;
119
				}
120
				failsafe++;
121
				if (failsafe > 5) {
122
					this.say(con, room, 'The command "' + config.commandcharacter + '' + opts[0] + '" could not be found.');
123
					return;
124
				}
125
			}
126
127
			var settingsLevels = {
128
				off: false,
129
				disable: false,
130
				'+': '+',
131
				'%': '%',
132
				'@': '@',
133
				'&': '&',
134
				'#': '#',
135
				'~': '~',
136
				on: true,
137
				enable: true
138
			};
139
			if (!opts[1] || !opts[1].trim()) {
140
				var msg = '';
141
				if (!this.settings[cmd] || (!this.settings[cmd][room] && this.settings[cmd][room] !== false)) {
142
					msg = '.' + cmd + ' is available for users of rank ' + ((cmd === 'autoban' || cmd === 'banword') ? '#' : config.defaultrank) + ' and above.';
143
				} else if (this.settings[cmd][room] in settingsLevels) {
144
					msg = '.' + cmd + ' is available for users of rank ' + this.settings[cmd][room] + ' and above.';
145
				} else if (this.settings[cmd][room] === true) {
146
					msg = '.' + cmd + ' is available for all users in this room.';
147
				} else if (this.settings[cmd][room] === false) {
148
					msg = '' + config.commandcharacter+''+ cmd + ' is not available for use in this room.';
149
				}
150
				this.say(con, room, msg);
151
				return;
152
			} else {
153
				if (!this.hasRank(by, '#~')) return false;
154
				var newRank = opts[1].trim();
155
				if (!(newRank in settingsLevels)) return this.say(con, room, 'Unknown option: "' + newRank + '". Valid settings are: off/disable, +, %, @, &, #, ~, on/enable.');
156
				if (!this.settings[cmd]) this.settings[cmd] = {};
157
				this.settings[cmd][room] = settingsLevels[newRank];
158
				this.writeSettings();
159
				this.say(con, room, 'The command ' + config.commandcharacter + '' + cmd + ' is now ' +
160
					(settingsLevels[newRank] === newRank ? ' available for users of rank ' + newRank + ' and above.' :
161
					(this.settings[cmd][room] ? 'available for all users in this room.' : 'unavailable for use in this room.')))
162
			}
163
		}
164
	},
165
	blacklist: 'autoban',
166
	ban: 'autoban',
167
	ab: 'autoban',
168
	autoban: function(arg, by, room, con) {
169
		if (!this.canUse('autoban', room, by) || room.charAt(0) === ',') return false;
170
		if (!this.hasRank(this.ranks[room] || ' ', '%@&#~')) return this.say(con, room, config.nick + ' requires rank of @ or higher to (un)blacklist.');
171
172
		arg = arg.split(',');
173
		var added = [];
174
		var illegalNick = [];
175
		var alreadyAdded = [];
176
		if (!arg.length || (arg.length === 1 && !arg[0].trim().length)) return this.say(con, room, 'You must specify at least one user to blacklist.');
177
		for (var i = 0; i < arg.length; i++) {
178
			var tarUser = toId(arg[i]);
179
			if (tarUser.length < 1 || tarUser.length > 18) {
180
				illegalNick.push(tarUser);
181
				continue;
182
			}
183
			if (!this.blacklistUser(tarUser, room)) {
184
				alreadyAdded.push(tarUser);
185
				continue;
186
			}
187
			this.say(con, room, '/roomban ' + tarUser + ', Blacklisted user');
188
			this.say(con,room, '/modnote ' + tarUser + ' was added to the blacklist by ' + by + '.');
189
			added.push(tarUser);
190
		}
191
192
		var text = '';
193
		if (added.length) {
194
			text += 'User(s) "' + added.join('", "') + '" added to blacklist successfully. ';
195
			this.writeSettings();
196
		}
197
		if (alreadyAdded.length) text += 'User(s) "' + alreadyAdded.join('", "') + '" already present in blacklist. ';
198
		if (illegalNick.length) text += 'All ' + (text.length ? 'other ' : '') + 'users had illegal nicks and were not blacklisted.';
199
		this.say(con, room, text);
200
	},
201
	unblacklist: 'unautoban',
202
	unban: 'unautoban',
203
	unab: 'unautoban',
204
	unautoban: function(arg, by, room, con) {
205
		if (!this.canUse('autoban', room, by) || room.charAt(0) === ',') return false;
206
		if (!this.hasRank(this.ranks[room] || ' ', '@&#~')) return this.say(con, room, config.nick + ' requires rank of @ or higher to (un)blacklist.');
207
208
		arg = arg.split(',');
209
		var removed = [];
210
		var notRemoved = [];
211
		if (!arg.length || (arg.length === 1 && !arg[0].trim().length)) return this.say(con, room, 'You must specify at least one user to unblacklist.');
212
		for (var i = 0; i < arg.length; i++) {
213
			var tarUser = toId(arg[i]);
214
			if (tarUser.length < 1 || tarUser.length > 18) {
215
				notRemoved.push(tarUser);
216
				continue;
217
			}
218
			if (!this.unblacklistUser(tarUser, room)) {
219
				notRemoved.push(tarUser);
220
				continue;
221
			}
222
			this.say(con, room, '/roomunban ' + tarUser);
223
			removed.push(tarUser);
224
		}
225
226
		var text = '';
227
		if (removed.length) {
228
			text += 'User(s) "' + removed.join('", "') + '" removed from blacklist successfully. ';
229
			this.writeSettings();
230
		}
231
		if (notRemoved.length) text += (text.length ? 'No other ' : 'No ') + 'specified users were present in the blacklist.';
232
		this.say(con, room, text);
233
	},
234
	viewbans: 'viewblacklist',
235
	vab: 'viewblacklist',
236
	viewautobans: 'viewblacklist',
237
	viewblacklist: function(arg, by, room, con) {
238
		if (!this.canUse('autoban', room, by) || room.charAt(0) === ',') return false;
239
240
		var text = '';
241
		if (!this.settings.blacklist || !this.settings.blacklist[room]) {
242
			text = 'No users are blacklisted in this room.';
243
		} else {
244
			if (arg.length) {
245
				var nick = toId(arg);
246
				if (nick.length < 1 || nick.length > 18) {
247
					text = 'Invalid nickname: "' + nick + '".';
248
				} else {
249
					text = 'User "' + nick + '" is currently ' + (nick in this.settings.blacklist[room] ? '' : 'not ') + 'blacklisted in ' + room + '.';
250
				}
251
			} else {
252
				var nickList = Object.keys(this.settings.blacklist[room]);
253
				if (!nickList.length) return this.say(con, room, '/pm ' + by + ', No users are blacklisted in this room.');
254
				this.uploadToHastebin(con, room, by, 'The following users are banned in ' + room + ':\n\n' + nickList.join('\n'))
255
				return;
256
			}
257
		}
258
		this.say(con, room, '/pm ' + by + ', ' + text);
259
	},
260
	banphrase: 'banword',
261
	banword: function(arg, by, room, con) {
262
		if (!this.canUse('banword', room, by)) return false;
263
		if (!this.settings.bannedphrases) this.settings.bannedphrases = {};
264
		arg = arg.trim().toLowerCase();
265
		if (!arg) return false;
266
		var tarRoom = room;
267
268
		if (room.charAt(0) === ',') {
269
			if (!this.hasRank(by, '~')) return false;
270
			tarRoom = 'global';
271
		}
272
273
		if (!this.settings.bannedphrases[tarRoom]) this.settings.bannedphrases[tarRoom] = {};
274
		if (arg in this.settings.bannedphrases[tarRoom]) return this.say(con, room, "Phrase \"" + arg + "\" is already banned.");
275
		this.settings.bannedphrases[tarRoom][arg] = 1;
276
		this.writeSettings();
277
		this.say(con, room, "Phrase \"" + arg + "\" is now banned.");
278
	},
279
	unbanphrase: 'unbanword',
280
	unbanword: function(arg, by, room, con) {
281
		if (!this.canUse('banword', room, by)) return false;
282
		arg = arg.trim().toLowerCase();
283
		if (!arg) return false;
284
		var tarRoom = room;
285
286
		if (room.charAt(0) === ',') {
287
			if (!this.hasRank(by, '~')) return false;
288
			tarRoom = 'global';
289
		}
290
291
		if (!this.settings.bannedphrases || !this.settings.bannedphrases[tarRoom] || !(arg in this.settings.bannedphrases[tarRoom])) 
292
			return this.say(con, room, "Phrase \"" + arg + "\" is not currently banned.");
293
		delete this.settings.bannedphrases[tarRoom][arg];
294
		if (!Object.size(this.settings.bannedphrases[tarRoom])) delete this.settings.bannedphrases[tarRoom];
295
		if (!Object.size(this.settings.bannedphrases)) delete this.settings.bannedphrases;
296
		this.writeSettings();
297
		this.say(con, room, "Phrase \"" + arg + "\" is no longer banned.");
298
	},
299
	viewbannedphrases: 'viewbannedwords',
300
	vbw: 'viewbannedwords',
301
	viewbannedwords: function(arg, by, room, con) {
302
		if (!this.canUse('banword', room, by)) return false;
303
		arg = arg.trim().toLowerCase();
304
		var tarRoom = room;
305
306
		if (room.charAt(0) === ',') {
307
			if (!this.hasRank(by, '~')) return false;
308
			tarRoom = 'global';
309
		}
310
311
		var text = "";
312
		if (!this.settings.bannedphrases || !this.settings.bannedphrases[tarRoom]) {
313
			text = "No phrases are banned in this room.";
314
		} else {
315
			if (arg.length) {
316
				text = "The phrase \"" + arg + "\" is currently " + (arg in this.settings.bannedphrases[tarRoom] ? "" : "not ") + "banned " +
317
					(room.charAt(0) === ',' ? "globally" : "in " + room) + ".";
318
			} else {
319
				var banList = Object.keys(this.settings.bannedphrases[tarRoom]);
320
				if (!banList.length) return this.say(con, room, "No phrases are banned in this room.");
321
				this.uploadToHastebin(con, room, by, "The following phrases are banned " + (room.charAt(0) === ',' ? "globally" : "in " + room) + ":\n\n" + banList.join('\n'))
322
				return;
323
			}
324
		}
325
		this.say(con, room, text);
326
	},
327
328
	tell: 'say',
329
	say: function(arg, by, room, con) {
330
		if (!this.canUse('say', room, by)) return false;
331
		this.say(con, room, stripCommands(arg) );
332
	},
333
	joke: function(arg, by, room, con) {
334
		if (!this.canUse('joke', room, by) || room.charAt(0) === ',') return false;
335
		var self = this;
336
337
		var reqOpt = {
338
			hostname: 'api.icndb.com',
339
			path: '/jokes/random',
340
			method: 'GET'
341
		};
342
		var req = http.request(reqOpt, function(res) {
343
			res.on('data', function(chunk) {
344
				try {
345
					var data = JSON.parse(chunk);
346
					self.say(con, room, data.value.joke.replace(/&quot;/g, "\""));
347
				} catch (e) {
348
					self.say(con, room, 'Sorry, couldn\'t fetch a random joke... :(');
349
				}
350
			});
351
		});
352
		req.end();
353
	},
354
	choose: function(arg, by, room, con) {
355
		if (arg.indexOf(',') === -1) {
356
			var choices = arg.split(' ');
357
		} else {
358
			var choices = arg.split(',');
359
		}
360
		choices = choices.filter(function(i) {return (toId(i) !== '')});
361
		if (choices.length < 2) return this.say(con, room, (room.charAt(0) === ',' ? '': '/pm ' + by + ', ') + '.choose: You must give at least 2 valid choices.');
362
363
		var choice = choices[Math.floor(Math.random()*choices.length)];
364
		this.say(con, room, ((this.canUse('choose', room, by) || room.charAt(0) === ',') ? '':'/pm ' + by + ', ') + stripCommands(choice));
365
	},
366
	usage: 'usagestats',
367
	usagestats: function(arg, by, room, con) {
368
		if (this.canUse('usagestats', room, by) || room.charAt(0) === ',') {
369
			var text = '';
370
		} else {
371
			var text = '/pm ' + by + ', ';
372
		}
373
		text += 'http://sim.smogon.com:8080/Stats/2014-09/';
374
		this.say(con, room, text);
375
	},
376
	seen: function(arg, by, room, con) { // this command is still a bit buggy
377
		var text = (room.charAt(0) === ',' ? '' : '/pm ' + by + ', ');
378
		arg = toId(arg);
379
		if (!arg || arg.length > 18) return this.say(con, room, text + 'Invalid username.');
380
		if (arg === toId(by)) {
381
			text += 'Have you looked in the mirror lately?';
382
		} else if (arg === toId(config.nick)) {
383
			text += 'You might be either blind or illiterate. Might want to get that checked out.';
384
		} else if (!this.chatData[arg] || !this.chatData[arg].seenAt) {
385
			text += 'The user ' + arg + ' has never been seen.';
386
		} else {
387
			text += arg + ' was last seen ' + this.getTimeAgo(this.chatData[arg].seenAt) + ' ago' + (
388
				this.chatData[arg].lastSeen ? ', ' + this.chatData[arg].lastSeen : '.');
389
		}
390
		this.say(con, room, text);
391
	},
392
	whois: function(arg, by, room, con) {
393
		if (this.canUse('helix', room, by) || room.charAt(0) === ',') {
394
			var text = '';
395
		} else {
396
			var text = '/pm ' + by + ', ';
397
		}
398
399
		var rand = Math.floor(20 * Math.random()) + 1;
400
401
		switch (rand) {
402
			case 1: text += "The greatest of all."; break;
403
			case 2: text += "Noob, better no talk about."; break;
404
			case 3: text += "Great, just greatttttttttt."; break;
405
			case 4: text += "Without a doubt, a bitch."; break;
406
			case 5: text += "Genius on planet earth."; break;
407
			case 6: text += "cunt cunt, stupid cunt, dumb cunt."; break;
408
			case 7: text += "You may rely on it."; break;
409
			case 8: text += "ERROR that name stinks, ERROR: i need a repair."; break;
410
			case 9: text += "Outlook not so good."; break;
411
			case 10: text += "Yuck, talk about something else plz."; break;
412
			case 11: text += "Better not tell you now."; break;
413
			case 12: text += "My man, i m a gay so as he."; break;
414
			case 13: text += "All mighty."; break;
415
			case 14: text += "The One with the least common sense."; break;
416
			case 15: text += "Cannot predict now."; break;
417
			case 16: text += "King of NOOBS."; break;
418
			case 17: text += "Ask again later."; break;
419
			case 18: text += "R00d like hell, i dont like him at all."; break;
420
			case 19: text += "Outlook good."; break;
421
			case 20: text += "FUCK OFF BITCH."; break;
422
		}
423
		this.say(con, room, text);
424
	},
425
426
	/**
427
	 * Room specific commands
428
	 *
429
	 * These commands are used in specific rooms on the Smogon server.
430
	 */
431
	espaol: 'esp',
432
	ayuda: 'esp',
433
	esp: function(arg, by, room, con) {
434
		// links to relevant sites for the Wi-Fi room 
435
		if (!(room === 'lobby' && config.serverid === 'lotus')) return false;
436
		var text = '';
437
		if (!this.canUse('guia', room, by)) {
438
			text += '/pm ' + by + ', ';
439
		}
440
		var messages = {
441
			reglas: 'Recuerda seguir las reglas de nuestra sala en todo momento: http://ps-salaespanol.weebly.com/reglas.html',
442
			faq: 'Preguntas frecuentes sobre el funcionamiento del chat: http://ps-salaespanol.weebly.com/faq.html',
443
			faqs: 'Preguntas frecuentes sobre el funcionamiento del chat: http://ps-salaespanol.weebly.com/faq.html',
444
			foro: '¡Visita nuestro foro para participar en multitud de actividades! http://ps-salaespanol.proboards.com/',
445
			guia: 'Desde este índice (http://ps-salaespanol.proboards.com/thread/575/ndice-de-gu) podrás acceder a toda la información importante de la sala. By: Lost Seso',
446
			liga: '¿Tienes alguna duda sobre la Liga? ¡Revisa el **índice de la Liga** aquí!: (http://goo.gl/CxH2gi) By: xJoelituh'
447
		};
448
		text += (toId(arg) ? (messages[toId(arg)] || '¡Bienvenidos a la comunidad de habla hispana! Si eres nuevo o tienes dudas revisa nuestro índice de guías: http://ps-salaespanol.proboards.com/thread/575/ndice-de-gu') : '¡Bienvenidos a la comunidad de habla hispana! Si eres nuevo o tienes dudas revisa nuestro índice de guías: http://ps-salaespanol.proboards.com/thread/575/ndice-de-gu');
449
		this.say(con, room, text);
450
	},
451
	studio: function(arg, by, room, con) {
452
		if (!(room === 'thestudio' && config.serverid === 'lotus')) return false;
453
		var text = '';
454
		if (!this.canUse('studio', room, by)) {
455
			text += '/pm ' + by + ', ';
456
		}
457
		var messages = {
458
			plug: '/announce The Studio\'s plug.dj can be found here: http://plug.dj/the-studio-3/'
459
		};
460
		this.say(con, room, text + (messages[toId(arg)] || ('Welcome to The Studio, a music sharing room on PS!. If you have any questions, feel free to PM a room staff member. Available commands for .studio: ' + Object.keys(messages).join(', '))));
461
	},
462
	'switch': function(arg, by, room, con) {
463
		if (!(room === 'gamecorner' && config.serverid === 'lotus') ||
464
			!this.canUse('switch', room, by)) return false;
465
		this.say(con, room, 'Taking over the world. Starting with Game Corner. Room deregistered.');
466
		this.say(con, room, '/k ' + (toId(arg) || by) + ', O3O YOU HAVE TOUCHED THE SWITCH');
467
	},
468
	wifi: function(arg, by, room, con) {
469
		// links to relevant sites for the Wi-Fi room 
470
		if (!(room === 'wifi' && config.serverid === 'lotus')) return false;
471
		var text = '';
472
		if (!this.canUse('wifi', room, by)) {
473
			text += '/pm ' + by + ', ';
474
		}
475
		var messages = {
476
			intro: 'Here is an introduction to Wi-Fi: http://tinyurl.com/welcome2wifi',
477
			rules: 'The rules for the Wi-Fi room can be found here: http://pstradingroom.weebly.com/rules.html',
478
			faq: 'Wi-Fi room FAQs: http://pstradingroom.weebly.com/faqs.html',
479
			faqs: 'Wi-Fi room FAQs: http://pstradingroom.weebly.com/faqs.html',
480
			scammers: 'List of known scammers: http://tinyurl.com/psscammers',
481
			cloners: 'List of approved cloners: http://goo.gl/WO8Mf4',
482
			tips: 'Scamming prevention tips: http://pstradingroom.weebly.com/scamming-prevention-tips.html',
483
			breeders: 'List of breeders: http://tinyurl.com/WiFIBReedingBrigade',
484
			signup: 'Breeders Sign Up: http://tinyurl.com/GetBreeding',
485
			bans: 'Ban appeals: http://pstradingroom.weebly.com/ban-appeals.html',
486
			banappeals: 'Ban appeals: http://pstradingroom.weebly.com/ban-appeals.html',
487
			lists: 'Major and minor list compilation: http://tinyurl.com/WifiSheets',
488
			trainers: 'List of EV trainers: http://tinyurl.com/WifiEVtrainingCrew',
489
			youtube: 'Wi-Fi room\'s official YouTube channel: http://tinyurl.com/wifiyoutube',
490
			league: 'Wi-Fi Room Pokemon League: http://tinyurl.com/wifiroomleague'
491
		};
492
		text += (toId(arg) ? (messages[toId(arg)] || 'Unknown option. General links can be found here: http://pstradingroom.weebly.com/links.html') : 'Links can be found here: http://pstradingroom.weebly.com/links.html');
493
		this.say(con, room, text);
494
	},
495
	mono: 'monotype',
496
	monotype: function(arg, by, room, con) {
497
		// links and info for the monotype room
498
		if (!(room === 'The Inferno League' && config.serverid === 'frost')) return false;
499
		var text = 'sorry';
500
		if (!this.canUse('The Inferno Leagur', room, by)) {
501
			text += '/pm ' + by + ', ';
502
		}
503
		var messages = {
504
			forums: 'The monotype room\'s forums can be found here: http://psmonotypeforum.createaforum.com/index.php',
505
			plug: 'The monotype room\'s plug can be found here: http://plug.dj/monotype-3-am-club/',
506
			rules: 'The monotype room\'s rules can be found here: http://psmonotype.wix.com/psmono#!rules/cnnz',
507
			site: 'The monotype room\'s site can be found here: http://www.psmonotype.wix.com/psmono',
508
			league: 'Information on the Monotype League can be found here: http://themonotypeleague.weebly.com/'
509
		};
510
		text += (toId(arg) ? (messages[toId(arg)] || 'Unknown option. General information can be found here: http://www.psmonotype.wix.com/psmono') : 'Welcome to the monotype room! Please visit our site to find more information. The site can be found here: http://www.psmonotype.wix.com/psmono');
511
		this.say(con, room, text);
512
	},
513
	survivor: function(arg, by, room, con) {
514
		// contains links and info for survivor in the Survivor room
515
		if (!(room === 'survivor' && config.serverid === 'showdown')) return false;
516
		var text = '';
517
		if (!this.canUse('survivor', room, by)) {
518
			text += '/pm ' + by + ', ';
519
		}
520
		var gameTypes = {
521
			hg: "http://survivor-ps.weebly.com/hunger-games.html",
522
			hungergames: "http://survivor-ps.weebly.com/hunger-games.html",
523
			classic: "http://survivor-ps.weebly.com/classic.html"
524
		};
525
		arg = toId(arg);
526
		if (arg) {
527
			if (!(arg in gameTypes)) return this.say(con, room, "Invalid game type. The game types can be found here: http://survivor-ps.weebly.com/themes.html");
528
			text += "The rules for this game type can be found here: " + gameTypes[arg];
529
		} else {
530
			text += "The list of game types can be found here: http://survivor-ps.weebly.com/themes.html";
531
		}
532
		this.say(con, room, text);
533
	},
534
	games: function(arg, by, room, con) {
535
		// lists the games for the games room
536
		if (!(room === 'gamecorner' && config.serverid === 'showdown')) return false;
537
		var text = '';
538
		if (!this.canUse('games', room, by)) {
539
			text += '/pm ' + by + ', ';
540
		}
541
		this.say(con, room, text + 'Game List: 1. Would You Rather, 2. NickGames, 3. Scattegories, 4. Commonyms, 5. Questionnaires, 6. Funarios, 7. Anagrams, 8. Spot the Reference, 9. Pokemath, 10. Liar\'s Dice');
542
		this.say(con, room, text + '11. Pun Game, 12. Dice Cup, 13. Who\'s That Pokemon?, 14. Pokemon V Pokemon (BST GAME), 15. Letter Getter, 16. Missing Link, 17. Parameters! More information can be found here: http://psgamecorner.weebly.com/games.html');
543
	},
544
	happy: function(arg, by, room, con) {
545
		// info for The Happy Place
546
		if (!(room === 'thehappyplace' && config.serverid === 'showdown')) return false;
547
		var text = "";
548
		if (!this.canUse('happy', room, by)) text += "/pm " + by + ", ";
549
		arg = toId(arg);
550
		if (arg === 'askstaff' || arg === 'ask' || arg === 'askannie') {
551
			text += "http://thepshappyplace.weebly.com/ask-the-staff.html";
552
		} else {
553
			text += "The Happy Place, at its core, is a friendly environment for anyone just looking for a place to hang out and relax. We also specialize in taking time to give advice on life problems for users. Need a place to feel at home and unwind? Look no further!";
554
		}
555
		this.say(con, room, text);
556
	},
557
558
559
	/**
560
	 * Jeopardy commands
561
	 *
562
	 * The following commands are used for Jeopardy in the Academics room
563
	 * on the Smogon server.
564
	 */
565
566
567
	b: 'buzz',
568
	buzz: function(arg, by, room, con) {
569
		if (this.buzzed || !this.canUse('buzz', room, by) || room.charAt(0) === ',') return false;
570
		this.say(con, room, '**' + by.substr(1) + ' has buzzed in!**');
571
		this.buzzed = by;
572
		var self = this;
573
		this.buzzer = setTimeout(function(con, room, buzzMessage) {
574
			self.say(con, room, buzzMessage);
575
			self.buzzed = '';
576
		}, 7000, con, room, by + ', your time to answer is up!');
577
	},
578
	reset: function(arg, by, room, con) {
579
		if (!this.buzzed || !this.hasRank(by, '%@&#~') || room.charAt(0) === ',') return false;
580
		clearTimeout(this.buzzer);
581
		this.buzzed = '';
582
		this.say(con, room, 'The buzzer has been reset.');
583
	},
584
585
	champion: function(arg, by, room, con) {
586
		if (this.hasRank(by, '@#~') || room.charAt(0) === ',') {
587
			var text = " Champiom is the one who is the last to be faced by a challenger to get his/her name into hall of Fame. ";
588
		} else {
589
			var text = '/pm ' + by + ', ';
590
		}
591
		text += ' The Champion of The Avengers League is **Enrique** using **versatile** types to confuse the challenger';
592
		this.say(con, room, text);
593
	},
594
	
595
	facebook: function(arg, by, room, con) {
596
		if (this.hasRank(by, ' @#~') || room.charAt(0) === ',') {
597
			var text = "to make **Enrique Miguel** ur frnd on fb follow this link: ";
598
		} else {
599
			var text = '/pm ' + by + ', ';
600
		}
601
		text += ' https://www.facebook.com/profile.php?id=100008409962229';
602
		this.say(con, room, text);
603
	},
604
605
	multi: function(arg, by, room, con) {
606
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
607
			var text = "/wall Multileaguing means Joining other League while u still in some other League or joining two leagues at a time. MULTILEAGUING is not allowed in Inferno League.";
608
		} else {
609
			var text = '/pm ' + by + ', ';
610
		}
611
		text += '';
612
		this.say(con, room, text);
613
	},
614
	seed: function(arg, by, room, con) {
615
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
616
			var text = "/wall Poison Gym Leader of Inferno league. || Ace Pokemon: Mega Beedrill || Quote: Sometimes its not the heat from the fire that will kill you, but rather the poisonous smoke. || Badge: Venom Badge";
617
		} else {
618
			var text = '/pm ' + by + ', ';
619
		}
620
		text += '';
621
		this.say(con, room, text);
622
	},
623
	
624
henriy: function(arg, by, room, con) {
625
		if (this.hasRank(by, ' %@#') || room.charAt(0) === ',') {
626
			var text = "/wall Water Head Elite of Inferno league. || Ace Pokemon: Mega Blastoise || Quote: You Might Sink undesirably || Badge: Deep Sea Badge";
627
		} else {
628
			var text = '/pm ' + by + ', ';
629
		}
630
		text += '';
631
		this.say(con, room, text);
632
633
	},
634
	recruit: function(arg, by, room, con) {
635
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
636
			var text = "/wall To recruit members from main server, ask them if they are interested to join. If they are link them in PM and if they are not plz dont force them. Advertise on frost lobby using /advertise command.";
637
		} else {
638
			var text = '/pm ' + by + ', ';
639
		}
640
		text += '';
641
		this.say(con, room, text);
642
	},
643
	
644
hera: function(arg, by, room, con) {
645
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
646
			var text = "/wall Bug Elite of Inferno league. || Ace Pokemon: Mega Heracross || Quote: Even the weakest of Pokemon can be strong.";
647
		} else {
648
			var text = '/pm ' + by + ', ';
649
		}
650
		text += '';
651
		this.say(con, room, text);
652
	},
653
	
654
	
655
	active: function(arg, by, room, con) {
656
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
657
			var text = "/declare Sometime it may happen than someone stay alone in this room with no one here, the reason is different time zones. So guys i request you that please dont let it be ded, try to visit here, everyday as as long as possible, we need you tough guys. GOOD LUCK";
658
		} else {
659
			var text = '/pm ' + by + ', ';
660
		}
661
		text += '';
662
		this.say(con, room, text);
663
	},
664
		noob: function(arg, by, room, con) {
665
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
666
			var text = "/wall According to " + config.nick + " the most noob league is The Justice league and one example of it is: http://replay.pokemonshowdown.com/frost-monotype-1305859  and this aswell: http://replay.pokemonshowdown.com/frost-customgame-1306048.";
667
		
668
		} else {
669
			var text = '/pm ' + by + ', ';
670
		}
671
		text += '';
672
		this.say(con, room, text);
673
	},
674
	
675
		mini: function(arg, by, room, con) {
676
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
677
			var text = "/wall Psychic Gym Leader of Inferno League. || Ace Pokemon: Gallade || Quote: The Power of a Psychic is not only Special, it can also be psysical";
678
		} else {
679
			var text = '/pm ' + by + ', ';
680
		}
681
		text += '';
682
		this.say(con, room, text);
683
	},
684
		mastere: function(arg, by, room, con) {
685
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
686
			var text = "/wall Ground Gym Leader of Inferno League. || Ace Pokemon: Garchomp || Quote: I hope your ready to be sliced and diced to paste";
687
		} else {
688
			var text = '/pm ' + by + ', ';
689
		}
690
		text += '';
691
		this.say(con, room, text);
692
	},
693
	
694
	tour: function(arg, by, room, con) {
695
		if (config.serverid !== 'frost) return false;
696
		if (room.charAt(0) === ',') return Commands.tour.call(this, arg, by, 'theinfernoleague', con);
697
		if (room !== 'theinfernoleague' || !this.hasRank(by, '%@#&~')) return false;
698
		 
699
		if(arg === 'nu')
700
		 {
701
		 	this.say(con,room,"/wall **NeverUsed** || About Never Used can be Found Here:  Info: http://www.smogon.com/dex/xy/tags/nu | Viability rankings: http://www.smogon.com/forums/threads/oras-nu-viability-rankings.3523692/ | Sample teams: http://www.smogon.com/forums/threads/nu-sample-teams.3524218/")
702
		 this.say(con, room, "/tour new " + arg + ",elimination")
703
		 }
704
		 else if(arg === 'ou')
705
		 {
706
		 	this.say(con,room,"/wall **OverUsed** || About Over Used Can be Found here: Info: http://www.smogon.com/dex/xy/tags/ou | Viability rankings: https://www.smogon.com/forums/threads/3521602/ | Sample teams: http://www.smogon.com/forums/threads/oras-ou-sample-team-thread.3521695/")
707
		 this.say(con, room, "/tour new " + arg + ",elimination")
708
		 }
709
		 else if(arg === 'ubers')
710
		 {
711
		 	this.say(con,room,"/wall **Ubers** || About Ubers can be found here: Info: http://www.smogon.com/dex/xy/tags/uber | Viability rankings: http://www.smogon.com/forums/threads/oras-ubers-viability-ranking.3523419/ | Sample teams: http://www.smogon.com/forums/threads/sample-teams.3525516")
712
		 this.say(con, room, "/tour new " + arg + ",elimination")
713
		 }
714
		 else if(arg === 'lc')
715
		 {
716
		 	this.say(con,room,"/wall **Little Cup** || About Little Cup cn be Found here: Info: http://www.smogon.com/dex/xy/tags/lc | Viability rankings: http://www.smogon.com/forums/threads/lc-viability-rankings.3496013/ | Sample teams: http://www.smogon.com/forums/threads/lc-oras-sample-teams.3524438/")
717
 this.say(con, room, "/tour new " + arg + ",elimination")
718
 		 }
719
		 else if(arg === 'monotype')
720
		 {
721
		 	this.say(con,room,"/wall **Monotype** || About Monotype can be found here: Info: http://www.smogon.com/forums/threads/monotype-xy.3493087/ | Viability rankings: http://www.smogon.com/forums/threads/monotype-viability-rankings.3517737/")
722
		     this.say(con, room, "/tour new " + arg + ",elimination")
723
		 }
724
		 else if(arg === 'fu')
725
		 {
726
		 	this.say(con,room,"/wall **FU** || About Fu can be found Here: http://www.smogon.com/forums/threads/oras-fu-winner-of-omotm.3519286/")
727
		 this.say(con, room, "/tour new " + arg + ",elimination")
728
		 }
729
		 else if(arg === 'pu')
730
		 {
731
		 	this.say(con,room,"/wall **PU** || About PU can be found here:  Info: http://www.smogon.com/forums/threads/3513882/ | Viability rankings: http://www.smogon.com/forums/threads/3517353/ | Sample teams: http://www.smogon.com/forums/threads/pu-sample-teams.3519428/ ")
732
		 this.say(con, room, "/tour new " + arg + ",elimination")
733
		 }
734
		 else if(arg === 'ru')
735
		 {
736
		 	this.say(con,room,"/wall **RarelyUsed** || About RarelyUsed can be Found Here: Info: http://www.smogon.com/dex/xy/tags/ru | Viability rankings: http://www.smogon.com/forums/threads/ru-viability-ranking-oras.3523627/ | Sample teams: http://www.smogon.com/forums/threads/sample-teams-for-entering-the-oras-ru-metagame.3523714/")
737
		 
738
		 this.say(con, room, "/tour new " + arg + ",elimination")
739
		}
740
		 else if(arg ==='randombattle')
741
		 {
742
		 	this.say(con,room,"/Wall **Random Battle** || All random Teams will be used.")
743
		 this.say(con, room, "/tour new " + arg + ",elimination")
744
		 }
745
		 else if (arg === 'cc1v1')
746
		 {
747
		 	this.say(con,room,"/wall **Challenge Cup 1vs1**|| Random Pokemons and a 1 on 1 battle. ")
748
		 this.say(con, room, "/tour new " + arg + ",elimination")
749
		 }
750
		 else if(arg === "challengecup")
751
		 {
752
		 	this.say(con,room,"/wall **Challenge Cup**. All Teams Are random.")
753
		 this.say(con, room, "/tour new " + arg + ",elimination")
754
		 }
755
		 else if(arg === "balancedhackmons")
756
		 {
757
		 	this.say(con,room,"/wall **Balanced Hackmons** || About Balanced hackmons can be found here: Info: http://www.smogon.com/forums/threads/balanced-hackmons.3489849/ | Viability rankings: http://www.smogon.com/forums/threads/balanced-hackmons-viability-rankings.3525676/")
758
		 this.say(con, room, "/tour new " + arg + ",elimination")
759
		 }
760
		 else if(arg === "aaa")
761
		 {
762
		 	 this.say(con, room, "/tour new almostanyability,elimination")
763
764
		 	this.say(con,room,"/wall **Almost any Ability** Tournament || About Almost any Ability can be found here: Info: http://www.smogon.com/forums/threads/almost-any-ability.3517022/ | Viability rankings: http://www.smogon.com/forums/threads/aaa-viability-rankings.3508794/")
765
				 }
766
				  else if(arg === "battlespotsingles")
767
		 {
768
		 	 this.say(con, room, "/tour new battlespotsingles,elimination")
769
770
		 	this.say(con,room,"/wall **Battle Spot Singles**|| About Spot Singles can be found here: Info: http://www.smogon.com/forums/threads/singles.3494393/ | Viability rankings: http://www.smogon.com/forums/threads/viability-rankings.3514689/ | Sample teams: http://www.smogon.com/forums/threads/battle-spot-sample-teams.3520502/")
771
				 }
772
    else if(arg === "offmono")
773
		 {
774
		 	this.say(con,room,"/wall **Official Inferno League Head Elite Tournament**.All Inferno League Elites are requested to join. The Winner will be the **Head Elite** of Inferno League for 1 week. **Only League teams shall be used and no changing of Team.** || Good Luck.")
775
		 this.say(con, room, "/tour new monotype,elimination")
776
		 }
777
		 else
778
		 {
779
		 	this.say(con,room,"**ERROR**: Either no tournament format exsist or no commands are yet made for it.")
780
		 
781
		 }
782
783
784
	},
785
	start: function(arg, by, room, con) {
786
		if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
787
		if (!this.hasRank(by, '%@#~') || room.charAt(0) === ',') return false;
788
		 
789
		if(arg === 'randombattle' || arg === 'cc1v1' || arg === 'challengecup')
790
		{
791
			this.say(con,room,"/wall Good **Luck To everyone**. For inactive opponents **wait 2 mins** and you will be advanced automatically. Other matches can be joined due to random teams.")
792
		this.say(con, room, "/tour start " )
793
		this.say(con, room, "/tour setautodq 2" )
794
		this.say(con, room, "/tour startautodq 2" )
795
		}
796
		else if(arg === 'ou' || arg === 'nu'  || arg === 'ru'  ||  arg === 'pu' || arg === 'fu' || arg === 'ubers' || arg === 'balancedhackmons' || arg === 'monotype')
797
		{
798
			 this.say(con,room, "/wall Good luck to all! **Joining other matches while still in the tournament is against the rules and will result in immediate disqualification**") 
799
		this.say(con, room, "/tour start " )
800
		this.say(con, room, "/tour setautodq 2" )
801
		this.say(con, room, "/tour startautodq 2" )
802
		}
803
		else
804
		{
805
			this.say(con,room,"/wall No a Valid Tour start command. Try **.start [tier]**")
806
		}
807
	},
808
809
	
810
	welcome: function(arg, by, room, con) {
811
		if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
812
		if (!this.hasRank(by, ' %@#~') || room.charAt(0) === ',') return false;
813
		 
814
       if(this.hasRank(by, '%@#~'))
815
       {
816
       	this.say(con, room, "/wall Welcome to The Inferno League. Have a nice and comfortable stay here. For Joining PM League Owners Enrique,Death or Edd. From " + by + " and the whole Inferno League staff.")
817
       }
818
       else
819
       {
820
       	this.say(con,room," **This commands is only for The Inferno League Staff members.** ")
821
       }
822
   },
823
   official: function(arg, by, room, con) {
824
		if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
825
		if (!this.hasRank(by, ' %@#~') || room.charAt(0) === ',') return false;
826
		 
827
       if(arg === 'monday')
828
       {
829
       	this.say(con,room," No event is decided for " + arg )
830
       }
831
       else if(arg === 'tuesday')
832
       	{
833
       	this.say(con,room," The Head Elite 4 tour is on " + arg)
834
       }
835
       else if(arg === 'wednesday')
836
       {
837
       	this.say(con,room," No event is decided for " + arg)
838
       }
839
        else if(arg === 'thursday')
840
       {
841
       	this.say(con,room," No event is decided for " + arg)
842
       }
843
 else if(arg === 'friday')
844
       {
845
       	this.say(con,room," No event is decided for " + arg)
846
       }
847
 else if(arg === 'saturday')
848
       {
849
       	this.say(con,room," No event is decided for " + arg)
850
       }
851
 else if(arg === 'sunday')
852
       {
853
       	this.say(con,room," No event is decided for " + arg)
854
       }
855
856
},
857
	autumn: function(arg, by, room, con) {
858
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
859
			var text = "/wall ``RU`` Frontier of Inferno League . || Ace: Smeargle || Quote: Painting you up and making you fall get it cause Autumn...";
860
		} else {
861
			var text = '/pm ' + by + ', ';
862
		}
863
		text += '';
864
		this.say(con, room, text);
865
	},
866
	type: function(arg, by, room, con){
867
			if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
868
		if (!this.hasRank(by, ' %@#~') || room.charAt(0) === ',') return false;
869
		 
870
       if(arg === 'fire')
871
       {
872
       	this.say(con,room,"/wall Both Leader and Elite spots are **Vacant** ")
873
       }
874
       else if(arg === 'grass')
875
       	{
876
       	this.say(con,room,"/wall The Grass Gym Leader is Fazou (.fazou) and Grass Elite spot is **Vacant** ")
877
       }
878
       else if(arg === 'flying')
879
       {
880
       	this.say(con,room,"/wall Gym Leader is Snake and Elite spot is **Vacant** ")
881
       }
882
        else if(arg === 'water')
883
       {
884
       	this.say(con,room,"/wall leader is Getsu and Water Elite is Henriy( .henriy )  ")
885
       }
886
 else if(arg === 'psychic')
887
       {
888
       	this.say(con,room,"/wall No spot is vacant as Leader is Mini ( .mini ) and Elite is Esper ( .member esper) ")
889
       }
890
 else if(arg === 'dark')
891
       {
892
       	this.say(con,room,"/wall Gym Leader is nakazi and Elite is Melvin ( .melvin )")
893
       }
894
 else if(arg === 'fighting')
895
       {
896
       	this.say(con,room,"/wall Leader is **Vacant** and Elite is Spheal ( .spheal )")
897
       }
898
       else if(arg === 'fairy')
899
       {
900
       	this.say(con,room,"/wall Leader is Cold and Elite is Offai")
901
       }
902
       else if(arg === 'ghost')
903
       {
904
       	this.say(con,room,"/wall Both Leader and Elite Spot is **vacant**")
905
       }
906
       else if(arg === 'steel')
907
       {
908
       	this.say(con,room,"/wall No spot is vacant as Leader is Blue ( .blue ) and Elite is Wiggles ( .wiggles )")
909
       }
910
       else if(arg === 'ground')
911
       {
912
       	this.say(con,room,"/wall Leader is Mastere ( .mastere ) and Elite spot is **Vacant** ")
913
       }
914
       else if(arg === 'rock')
915
       {
916
       	this.say(con,room,"/wall Both Leader and Elite Spot is **vacant**")
917
       }
918
       else if(arg === 'dragon')
919
       {
920
       	this.say(con,room,"/wall Leader is Julius ( .member julius) and Elite is PBR ( .member pbr )")
921
       }
922
       else if(arg === 'bug')
923
       {
924
       	this.say(con,room,"/wall Gym Leader spot is **Vacant** and Elite is Hera ( .hera )")
925
       }
926
       else if(arg === 'ice')
927
       {
928
       	this.say(con,room,"/wall Leader is Icen and Elite is Anish ( .anish )")
929
       }
930
       else if(arg === 'electric')
931
       {
932
       	this.say(con,room,"/wall Gym leader is eevee ( .eevee ) and Elite Spot is **Vacant** ")
933
       }
934
       else if(arg === 'normal')
935
       {
936
       	this.say(con,room,"/wall Leader spot is **Vacant** and Elite is Chocoz. ")
937
       }
938
        else if(arg === 'poison')
939
       {
940
       	this.say(con,room,"/wall Leader is seed ( .seed ) and Elite Spot is **Vacant** ")
941
       }
942
       else
943
       {
944
       	this.say(con,room,"**ERROR**: Not a valid bot command, try doing .type [typename]")
945
       }
946
},
947
	member: function(arg, by, room, con){
948
			if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
949
		if (!this.hasRank(by, '%@#~') || room.charAt(0) === ',') return false;
950
		 
951
       if(arg === 'esper')
952
       {
953
       	this.say(con,room,'/declare <div class=\"broadcast-red\"><font color=white size=2><i><b> Psychic Elite of Inferno League.<br> Ace: Metagross<br><div class=\"broadcast-black\"><img src=\"http://fc02.deviantart.net/fs71/f/2013/117/6/9/metagross_by_theblacksavior-d639g1z.jpg\" height=250 width=500><br><div class=\"broadcast-red\"><Quote:')
954
       }
955
       else if(arg === 'wiso')
956
       	{
957
       	this.say(con,room,'/declare <div class=\"broadcast-red\"><font color=white size=2><i><b> Ghost Elite of Inferno League.<br> Ace: Gengar<br><div class=\"broadcast-black\"><img src=\"http://fc07.deviantart.net/fs50/f/2009/332/b/4/Gengar_Shadow_Ball_by_Scootw91.jpg\" height=250 width=500><br><div class=\"broadcast-red\"><Quote:')
958
       }
959
       else if(arg === 'lexie')
960
       {
961
       	this.say(con,room,'/declare <div class=\"broadcast-red\"><font color=white size=2><i><b> Fighting Leader of Inferno League.<br> Ace: Hawlucha<br><div class=\"broadcast-black\"><img src=\"http://fc04.deviantart.net/fs71/i/2014/028/9/e/shiny_hawlucha_by_kmodon-d744rt8.jpg\" height=250 width=500><br><div class=\"broadcast-red\"><Quote: if you dont like to take a punch you can\'t have a life in the world as a whresitler');
962
       }
963
       else if(arg === 'blue')
964
       {
965
       	this.say(con,room,'/declare <div class=\"broadcast-red\"><font color=white size=2><i><b> Steel Leader of Inferno League.<br> Ace: Metagross<br><div class=\"broadcast-black\"><img src=\"http://www.pokebip.com/pokemon/membres/galeries/1387/1387745112086363800.jpg\" height=250 width=500><br><div class=\"broadcast-red\"><Quote:');
966
       }
967
       
968
       else
969
       {
970
       	this.say(con,room,"**ERROR**: No Such Member name exists in records. Have u  spelt the name correctly with all lowercase letters?")
971
       }
972
      
973
   },
974
   bot: function(arg, by, room, con) {
975
		if (this.hasRank(by, ' %@#~') || room.charAt(0) === ',') {
976
			var text = "**Welcome To Inferno League bot guide." + config.name + " is hosted by Enrique and some of the useful League commands are, **.tour [tier]** , **.member [name]** , **.start [tier]** (to start the tour). **NOTE**: Abusing of bot for useless commands can result in a mute or ban, beware.";
977
		} else {
978
			var text = '/pm ' + by + ', ';
979
		}
980
		text += '';
981
		this.say(con, room, text);
982
	},
983
	robot: function(arg, by, room, con){
984
			if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
985
		if (!this.hasRank(by, ' +%@#~') || room.charAt(0) === ',') return false;
986
		 
987
       if(arg === 'voice')
988
       {
989
       	this.say(con,room,"/roompromote" + by + ",+")
990
       }
991
       else if(arg === 'driver')
992
       {
993
       	this.say(con,room,"/roompromote" + by + ",%")
994
       }
995
       else if(arg === 'mod')
996
       {
997
       	this.say(con,room,"/roompromote" + by + ",@")
998
       }
999
        else if(arg === 'demote%')
1000
       {
1001
       	this.say(con,room,"/roomdemote" + by + ",%")
1002
       }
1003
        else if(arg === 'demote+')
1004
       {
1005
       	this.say(con,room,"/roomdemote" + by + ",+")
1006
       }
1007
        else if(arg === 'demote')
1008
       {
1009
       	this.say(con,room,"/roomdemote" + by + ", ")
1010
       }
1011
       else
1012
       {
1013
       	this.say(con,room,"**ERROR** cant be promoted to " + arg + " at this time")
1014
       }
1015
   },
1016
   inferno: function(arg, by, room, con){
1017
			if (!(room === 'theinfernoleague' && config.serverid === 'frost')) return false;
1018
		if (!this.hasRank(by, ' +%@#~') || room.charAt(0) === ',') return false;
1019
		 
1020
       if(arg === 'leaders')
1021
       {
1022
       	this.say(con,room,"/declare Total Leaders of Inferno League (10): Cold(Fairy) , Fazou(Grass) , Blue(Steel)  , Julius(dragon) , Seed(Poison) , Icen(Ice) , Getsu(Water) , Snake(Flying) , Mastere(Ground) , Canyon(Rock)")
1023
       }
1024
      else if(arg === "elites")
1025
      {
1026
      	this.say(con,room,"/declare Total Elites of Inferno League(11): Henriy(Water) , Melvin(Dark) , Wiso(Ghost) , Hera(Bug) , Esper(Psychic) , Thunda(Fight) , Anish(Ice) , Offai(fairy) , Chocoz(Normal) , Paldi(Ground) , Wiggles(Steel)")
1027
      }
1028
   },
1029
1030
};