comparison plugins/roulette/roulette.js @ 847:a23b7b574ed2

irccd: rename [format] section to [templates], closes #1671
author David Demelier <markand@malikania.fr>
date Wed, 10 Jul 2019 20:10:00 +0200
parents 06cc2f95f479
children 5e25439fe98d
comparison
equal deleted inserted replaced
846:dcef68d82fd3 847:a23b7b574ed2
32 var Util = Irccd.Util; 32 var Util = Irccd.Util;
33 33
34 /** 34 /**
35 * Formats for writing. 35 * Formats for writing.
36 */ 36 */
37 Plugin.format = { 37 Plugin.templates = {
38 "lucky": "#{nickname}, you're lucky this time", 38 "lucky": "#{nickname}, you're lucky this time",
39 "shot": "HEADSHOT" 39 "shot": "HEADSHOT"
40 }; 40 };
41 41
42 function Gun(server, channel) 42 function Gun(server, channel)
108 108
109 if (!game) 109 if (!game)
110 game = Gun.create(server, channel); 110 game = Gun.create(server, channel);
111 111
112 if (game.shot()) { 112 if (game.shot()) {
113 server.kick(Util.splituser(origin), channel, Util.format(Plugin.format["shot"], kw)); 113 server.kick(Util.splituser(origin), channel, Util.format(Plugin.templates["shot"], kw));
114 Gun.remove(game); 114 Gun.remove(game);
115 } else { 115 } else {
116 kw.count = (6 - game.index).toString(); 116 kw.count = (6 - game.index).toString();
117 server.message(channel, Util.format(Plugin.format["lucky"], kw)); 117 server.message(channel, Util.format(Plugin.templates["lucky"], kw));
118 } 118 }
119 } 119 }