Merge branch 'frameworkInternals'
This commit is contained in:
commit
14575c94cf
@ -441,10 +441,8 @@ class Network {
|
||||
}
|
||||
|
||||
if (this.irc) {
|
||||
const connected = this.irc.connection && this.irc.connection.connected;
|
||||
|
||||
if (this.nick !== oldNick) {
|
||||
if (connected) {
|
||||
if (this.irc.connected) {
|
||||
// Send new nick straight away
|
||||
this.irc.changeNick(this.nick);
|
||||
} else {
|
||||
@ -459,7 +457,7 @@ class Network {
|
||||
}
|
||||
|
||||
if (
|
||||
connected &&
|
||||
this.irc.connected &&
|
||||
this.realname !== oldRealname &&
|
||||
this.irc.network.cap.isEnabled("setname")
|
||||
) {
|
||||
|
@ -15,7 +15,7 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (irc.connection && irc.connection.connected) {
|
||||
if (irc.connected) {
|
||||
chan.pushMessage(
|
||||
this,
|
||||
new Msg({
|
||||
|
@ -47,7 +47,7 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
|
||||
// If connected to IRC, send to server and wait for ACK
|
||||
// otherwise update the nick and UI straight away
|
||||
if (network.irc) {
|
||||
if (network.irc.connection && network.irc.connection.connected) {
|
||||
if (network.irc.connected) {
|
||||
network.irc.changeNick(newNick);
|
||||
|
||||
return;
|
||||
|
@ -36,9 +36,7 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
|
||||
if (
|
||||
target.type !== ChanType.CHANNEL ||
|
||||
target.state === ChanState.PARTED ||
|
||||
!network.irc ||
|
||||
!network.irc.connection ||
|
||||
!network.irc.connection.connected
|
||||
!network.irc.connected
|
||||
) {
|
||||
this.part(network, target);
|
||||
} else {
|
||||
|
@ -4,7 +4,7 @@ const commands = ["raw", "send", "quote"];
|
||||
|
||||
const input: PluginInputHandler = function ({irc}, chan, cmd, args) {
|
||||
if (args.length !== 0) {
|
||||
irc.connection.write(args.join(" "));
|
||||
irc.raw(...args);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user