Cleanup.
This commit is contained in:
parent
19894dce1f
commit
d33210c594
4 changed files with 8 additions and 6 deletions
|
@ -399,7 +399,7 @@ class Mobibot(nickname: String, channel: String, logsDirPath: String, p: Propert
|
|||
* Sends a notice to the channel.
|
||||
*/
|
||||
fun send(notice: String?) {
|
||||
if (notice != null) send(channel, notice, false)
|
||||
notice?.let { send(channel, it, false) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -419,6 +419,7 @@ class Mobibot(nickname: String, channel: String, logsDirPath: String, p: Propert
|
|||
/**
|
||||
* Send a formatted commands/modules, etc. list.
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun sendList(
|
||||
nick: String,
|
||||
list: List<String>,
|
||||
|
@ -600,6 +601,7 @@ class Mobibot(nickname: String, channel: String, logsDirPath: String, p: Propert
|
|||
init {
|
||||
System.getProperties().setProperty("sun.net.client.defaultConnectTimeout", Constants.CONNECT_TIMEOUT.toString())
|
||||
System.getProperties().setProperty("sun.net.client.defaultReadTimeout", Constants.CONNECT_TIMEOUT.toString())
|
||||
|
||||
name = nickname
|
||||
ircServer = p.getProperty("server", Constants.DEFAULT_SERVER)
|
||||
ircPort = getIntProperty(p.getProperty("port"), Constants.DEFAULT_PORT)
|
||||
|
|
|
@ -85,7 +85,7 @@ public class Info extends AbstractCommand {
|
|||
@NotNull final String args,
|
||||
final boolean isOp,
|
||||
final boolean isPrivate) {
|
||||
getBot().sendList(sender, allVersions, 1, isPrivate, false, false);
|
||||
getBot().sendList(sender, allVersions, 1, isPrivate);
|
||||
|
||||
final StringBuilder info = new StringBuilder("Uptime: ");
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public class Versions extends AbstractCommand {
|
|||
final boolean isOp,
|
||||
final boolean isPrivate) {
|
||||
if (isOp) {
|
||||
getBot().sendList(sender, allVersions, 1, isPrivate, false, false);
|
||||
getBot().sendList(sender, allVersions, 1, isPrivate);
|
||||
} else {
|
||||
getBot().helpDefault(sender, false, isPrivate);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue