Skip to content

Commit

Permalink
Stupid tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
phit committed Aug 25, 2024
1 parent 104c2e6 commit e6f68cf
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,34 @@ protected void logMessage(String msg) {
}

/* event handling */
// @Override
// protected void onJoin(String channel, String sender) {
// toMc(String.format(FORMAT1_IRC_JOIN, sender));
// }
// @Override
// protected void onJoin(String channel, String sender) {
// toMc(String.format(FORMAT1_IRC_JOIN, sender));
// }
//
// @Override
// protected void onPart(String channel, String sender, String reason) {
// if (SIBConfig.MC_FORMATTING.get()) {
// reason = IRCMinecraftConverter.convIRCtoMinecraft(reason);
// }
// toMc(String.format(FORMAT2_IRC_PART, sender, reason));
// }
// @Override
// protected void onPart(String channel, String sender, String reason) {
// if (SIBConfig.MC_FORMATTING.get()) {
// reason = IRCMinecraftConverter.convIRCtoMinecraft(reason);
// }
// toMc(String.format(FORMAT2_IRC_PART, sender, reason));
// }
//
// @Override
// protected void onQuit(String sender, String reason) {
// if (SIBConfig.MC_FORMATTING.get()) {
// reason = IRCMinecraftConverter.convIRCtoMinecraft(reason);
// }
// toMc(String.format(FORMAT2_IRC_QUIT, sender, reason));
// }
// @Override
// protected void onQuit(String sender, String reason) {
// if (SIBConfig.MC_FORMATTING.get()) {
// reason = IRCMinecraftConverter.convIRCtoMinecraft(reason);
// }
// toMc(String.format(FORMAT2_IRC_QUIT, sender, reason));
// }
//
// @Override
// protected void onKick(String channel, String opsender, String victim, String reason) {
// if (SIBConfig.MC_FORMATTING.get()) {
// reason = IRCMinecraftConverter.convIRCtoMinecraft(reason);
// }
// toMc(String.format(FORMAT3_IRC_KICK, victim, opsender, reason));
// }
// @Override
// protected void onKick(String channel, String opsender, String victim, String reason) {
// if (SIBConfig.MC_FORMATTING.get()) {
// reason = IRCMinecraftConverter.convIRCtoMinecraft(reason);
// }
// toMc(String.format(FORMAT3_IRC_KICK, victim, opsender, reason));
// }

@Override
protected void onMessage(String channel, String sender, String message) {
Expand All @@ -75,18 +75,18 @@ protected void onMessage(String channel, String sender, String message) {
}
}

// @Override
// protected void onAction(String channel, String sender, String action) {
// if (SIBConfig.MC_FORMATTING.get()) {
// action = IRCMinecraftConverter.convIRCtoMinecraft(action);
// }
// toMc(String.format(FORMAT2_IRC_EMOTE, sender, action));
// }
// @Override
// protected void onAction(String channel, String sender, String action) {
// if (SIBConfig.MC_FORMATTING.get()) {
// action = IRCMinecraftConverter.convIRCtoMinecraft(action);
// }
// toMc(String.format(FORMAT2_IRC_EMOTE, sender, action));
// }
//
// @Override
// protected void onNickChange(String sender, String newnick) {
// toMc(String.format(FORMAT2_IRC_NICKCHG, sender, newnick));
// }
// @Override
// protected void onNickChange(String sender, String newnick) {
// toMc(String.format(FORMAT2_IRC_NICKCHG, sender, newnick));
// }

@Override
protected void onNumeric001() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,33 @@ public void playerLoggedOut(ServerPlayer e) {
toIrc(String.format(FORMAT1_MC_LOGOUT, SIBUtil.mangle(e.getName().getString())));
}

// @SubscribeEvent
// public void command(CommandEvent e) {
// String nickname = SIBUtil.mangle(e.getSender().getDisplayName().getUnformattedText());
// /*
// * Usually these would be instanceof checks, checking for
// * net.minecraft.command.server.CommandEmote and
// * net.minecraft.command.server.CommandBroadcast.
// *
// * However, some mods insist on overriding commands with their own wrappers
// * (looking at you, FTBUtilities) so we're checking the names here.
// */
// @SubscribeEvent
// public void command(CommandEvent e) {
// String nickname = SIBUtil.mangle(e.getSender().getDisplayName().getUnformattedText());
// /*
// * Usually these would be instanceof checks, checking for
// * net.minecraft.command.server.CommandEmote and
// * net.minecraft.command.server.CommandBroadcast.
// *
// * However, some mods insist on overriding commands with their own wrappers
// * (looking at you, FTBUtilities) so we're checking the names here.
// */
//
// String content = SIBUtil.join(" ", e.getParameters());
// String content = SIBUtil.join(" ", e.getParameters());
//
// if ("say".equals(e.getCommand().getName())) {
// if (this.bridge.getSibConf().ircFormatting) {
// content = IRCMinecraftConverter.convMinecraftToIRC(content);
// }
// toIrc(String.format(FORMAT2_MC_BROADCAST, nickname, content));
// if ("say".equals(e.getCommand().getName())) {
// if (this.bridge.getSibConf().ircFormatting) {
// content = IRCMinecraftConverter.convMinecraftToIRC(content);
// }
// toIrc(String.format(FORMAT2_MC_BROADCAST, nickname, content));
//
// } else if ("me".equals(e.getCommand().getName())) {
// if (this.bridge.getSibConf().ircFormatting) {
// content = IRCMinecraftConverter.convMinecraftToIRC(content);
// }
// toIrc(String.format(FORMAT2_MC_EMOTE, nickname, content));
// }
// }
// } else if ("me".equals(e.getCommand().getName())) {
// if (this.bridge.getSibConf().ircFormatting) {
// content = IRCMinecraftConverter.convMinecraftToIRC(content);
// }
// toIrc(String.format(FORMAT2_MC_EMOTE, nickname, content));
// }
// }

public void serverChat(ServerPlayer player, ChatEvent.ChatComponent component) {
Component chatComponent = component.get().copy();
Expand All @@ -73,12 +73,12 @@ public void serverChat(ServerPlayer player, ChatEvent.ChatComponent component) {
}
}

public EventResult livingDeath(LivingEntity livingEntity, DamageSource damageSource) {
if (livingEntity instanceof ServerPlayer) {
toIrc(String.format(FORMAT1_MC_DEATH, damageSource.getLocalizedDeathMessage(livingEntity).getString().replace(livingEntity.getName().toString(), SIBUtil.mangle(livingEntity.getName().toString())) ));
}
public EventResult livingDeath(LivingEntity livingEntity, DamageSource damageSource) {
if (livingEntity instanceof ServerPlayer) {
toIrc(String.format(FORMAT1_MC_DEATH, damageSource.getLocalizedDeathMessage(livingEntity).getString().replace(livingEntity.getName().toString(), SIBUtil.mangle(livingEntity.getName().toString())) ));
}
return EventResult.pass();
}
}

private void toIrc(String s) {
this.bridge.sendToIrc(s);
Expand Down

0 comments on commit e6f68cf

Please sign in to comment.