Changed sendCommandsList to sendList.

This commit is contained in:
Erik C. Thauvin 2020-04-16 15:40:30 -07:00
parent b73ffc061d
commit fc35b6bfc8
6 changed files with 14 additions and 14 deletions

View file

@ -655,10 +655,10 @@ public class Mobibot extends PircBot {
Collections.sort(opsCommandsNames);
}
sendCommandsList(sender, commandsNames, 8, isPrivate, true);
sendList(sender, commandsNames, 8, isPrivate, true);
if (isOp) {
send(sender, "The op commands are:", isPrivate);
sendCommandsList(sender, opsCommandsNames, 8, isPrivate, true);
sendList(sender, opsCommandsNames, 8, isPrivate, true);
}
}
@ -994,7 +994,7 @@ public class Mobibot extends PircBot {
* @param isPrivate The private flag.
* @param isBold The bold flag
*/
public final void sendCommandsList(final String nick,
public final void sendList(final String nick,
final List<String> list,
final int size,
final boolean isPrivate,

View file

@ -144,7 +144,7 @@ class Ignore(defaultIgnore: String) : AbstractCommand() {
if (ignored.size > 0) {
bot.send(sender, "The following nicks are ignored:", isPrivate)
bot.sendCommandsList(sender, ignored.toList(), 8, isPrivate, true)
bot.sendList(sender, ignored.toList(), 8, isPrivate, true)
} else {
bot.send(sender, "No one is currently ${Utils.bold("ignored")}.", isPrivate)
}

View file

@ -59,7 +59,7 @@ class Modules : AbstractCommand() {
bot.send(sender, "There are no enabled modules.", isPrivate)
} else {
bot.send(sender, "The enabled modules are: ", isPrivate)
bot.sendCommandsList(sender, modulesNames, 7, isPrivate, false)
bot.sendList(sender, modulesNames, 7, isPrivate, false)
}
} else {
bot.helpDefault(sender, isOp, isPrivate)

View file

@ -60,12 +60,12 @@ class Users : AbstractCommand() {
val nicks = ArrayList<String>()
users.forEach { user ->
if (bot.isOp(user.nick)) {
nicks.add('@'.toString() + user.nick)
nicks.add("@${user.nick}")
} else {
nicks.add(user.nick)
}
}
bot.send(sender, nicks.sorted().joinToString(" "), isPrivate)
bot.sendList(sender, nicks.sorted(), 8, isPrivate, false)
}
}

View file

@ -218,7 +218,7 @@ public final class CurrencyConverter extends ThreadedModule {
}
} else if (query.contains(CURRENCY_RATES_KEYWORD)) {
bot.send(sender, "The currency rates for " + Utils.bold(pubDate) + " are:", isPrivate);
bot.sendCommandsList(sender, currencyRates(), 3, isPrivate, false);
bot.sendList(sender, currencyRates(), 3, isPrivate, false);
} else {
helpResponse(bot, sender, isPrivate);
}
@ -250,7 +250,7 @@ public final class CurrencyConverter extends ThreadedModule {
bot.getNick(),
isPrivate)), isPrivate);
bot.send(sender, "The supported currencies are: ", isPrivate);
bot.sendCommandsList(sender, new ArrayList<>(EXCHANGE_RATES.keySet()), 11, isPrivate, false);
bot.sendList(sender, new ArrayList<>(EXCHANGE_RATES.keySet()), 11, isPrivate, false);
}
}
}

View file

@ -225,7 +225,7 @@ public final class WorldTime extends AbstractModule {
final boolean isPrivate) {
if (args.length() == 0) {
bot.send(sender, "The supported countries/zones are: ", isPrivate);
bot.sendCommandsList(sender, new ArrayList<>(COUNTRIES_MAP.keySet()), 17, false, false);
bot.sendList(sender, new ArrayList<>(COUNTRIES_MAP.keySet()), 17, false, false);
} else {
final Message msg = worldTime(args);
if (isPrivate) {