Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BCDiceのCUI(手抜き)。設定はconfigBcDice.rbで行う。
bcdice_root = File.expand_path(File.dirname(__FILE__))
irc_dir = "#{bcdice_root}/irc"
$LOAD_PATH.unshift(irc_dir)
$LOAD_PATH.unshift(bcdice_root)
require 'bcdiceCore'
require 'net/irc'
require 'irc/ircBot'
ircBot = getInitializedIrcBot
ircBot.start
diff --git a/src/configBcDice.rb b/src/configBcDice.rb
index 2884300..bb9b1a9 100644
--- a/src/configBcDice.rb
+++ b/src/configBcDice.rb
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+require 'kconv'
require 'configBcDiceForSystem.rb'
$isDebug = false
@@ -12,7 +13,7 @@ $SEND_STR_MAX = 405; # 最大送信文字数(本来は500byte上限)
$isRollVoidDiceAtAnyRecive = true; # 発言の度に空ダイスを振るか?
$DICE_MAXCNT = 200; # ダイスが振れる最大個数
$DICE_MAXNUM = 1000; # ダイスの最大面数
-$ircCode = 6; # IRCサーバとの通信に使うコードをRuby::Kconv値で指定 (6:UTF-8)
+$ircCode = Kconv::UTF8; # IRCサーバとの通信に使うコードをRuby::Kconv値で指定
$isHandSort = true; # 手札をソートする必要があるか?
$quitCommand = 'お疲れ様'; # 終了用のTalkコマンド
$quitMessage = 'さようなら'; # 終了時のメッセージ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment