2009년 1월 26일 월요일

irssi 에서 한글 깨질때.

irssi 에서 한글이 깨지는 현상이 있을때...

 

우선은 locale 이 ko_KR.UTF-8 으로 설정되있는지 알아보구...

로켈 (locale) 설정을 보려면,

 

echo $lang << 을 쓴다.. SSH/터미널에..

그리구, ko_KR.UTF-8 << 가 떠야, 한글이 안깨진다...

아니면, locale << 써봐도 된다...

만약에 설정이 안되있다면,

아래 있는걸 따라서 해보세요...

설치 $ sudo apt-get install language-pack-ko
시스템 전체 로케일 변경 $ sudo locale-gen ko_KR.UTF-8

설정 $ sudo dpkg-reconfigure locales

저걸 다하면, reboot

 

 

irssi 에서...

/set recode on
/set recode_fallback cp949
/set recode_out_default_charset  cp949
/set recode_transliterate on
/save

를 설정해준다....

 

그후에,

/server irc.hanirc.org
(또는 /server miyu.hanirc.org 8080)

 

Ubuntu 에서 프로그램 다운로드 할때...

뭐.. 강좌라구도 할수 없는 기본이다...

환경, 전 우분투, 에서 한거 입니다...

 

처음 SSH/터미널을 키면....

 

~user@이름 $  << 나온다...

 

거기에서, 예를 들어, irssi 를 다운로드 해서 인스톨하구 싶으면,

터미널/SSH 창에..

 

apt-get install irssi << 하면.. 된다....

그럼, /etc/irssi.conf 가 생긴다, 아니면, /home/유저/irssi 가 생긴다,

거기들어가면, irssi.conf 가있다... 거기서 설정을 바꾸어 주면된다...

 

기본설정은...

 

servers = (
  { address = "irc.ubuntu.com"; chatnet = "Ubuntu"; port = "6667"; },
  { address = "irc.stealth.net"; chatnet = "IRCnet"; port = "6668"; },
  { address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; },
  {
    address = "irc.undernet.org";
    chatnet = "Undernet";
    port = "6667";
  },
  { address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
  {
    address = "irc.quakenet.org";
    chatnet = "QuakeNet";
    port = "6667";
  },
  { address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; }
);

chatnets = {
  IRCnet = {
    type = "IRC";
    max_kicks = "4";
    max_msgs = "5";
    max_whois = "4";
    max_query_chans = "5";
  };
  EFNet = {
    type = "IRC";
    max_kicks = "4";
    max_msgs = "3";
    max_whois = "1";
  };
  Undernet = {
    type = "IRC";
    max_kicks = "1";
    max_msgs = "3";
    max_whois = "30";
  };
  DALnet = {
    type = "IRC";
    max_kicks = "4";
    max_msgs = "3";
    max_whois = "30";
  };
  QuakeNet = {
    type = "IRC";
    max_kicks = "1";
    max_msgs = "3";
    max_whois = "30";
  };
  SILC = { type = "SILC"; };
  Ubuntu = { type = "IRC"; };
};

channels = (
  { name = "#irssi"; chatnet = "ircnet"; autojoin = "No"; },
  { name = "silc"; chatnet = "silc"; autojoin = "No"; }
);

aliases = {
  J = "join";
  WJOIN = "join -window";
  WQUERY = "query -window";
  LEAVE = "part";
  BYE = "quit";
  EXIT = "quit";
  SIGNOFF = "quit";
  DESCRIBE = "action";
  DATE = "time";
  HOST = "userhost";
  LAST = "lastlog";
  SAY = "msg *";
  WI = "whois";
  WII = "whois $0 $0";
  WW = "whowas";
  W = "who";
  N = "names";
  M = "msg";
  T = "topic";
  C = "clear";
  CL = "clear";
  K = "kick";
  KB = "kickban";
  KN = "knockout";
  BANS = "ban";
  B = "ban";
  MUB = "unban *";
  UB = "unban";
  IG = "ignore";
  UNIG = "unignore";
  SB = "scrollback";
  UMODE = "mode $N";
  WC = "window close";
  WN = "window new hide";
  SV = "say Irssi $J ($V) - http://irssi.org/";
  GOTO = "sb goto";
  CHAT = "dcc chat";
  RUN = "SCRIPT LOAD";
  CALC = "exec - if which bc &>/dev/null\\; then echo '$*' | bc | awk '{print \"$*=\"$$1}'\\; else echo bc was not found\\; fi";
  SBAR = "STATUSBAR";
  INVITELIST = "mode $C +I";
  Q = "QUERY";
  "MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
  EXEMPTLIST = "mode $C +e";
  ATAG = "WINDOW SERVER";
};

statusbar = {
  # formats:
  # when using {templates}, the template is shown only if it's argument isn't
  # empty unless no argument is given. for example {sb} is printed always,
  # but {sb $T} is printed only if $T isn't empty.

  items = {
    # start/end text in statusbars
    barstart = "{sbstart}";
    barend = "{sbend}";

    topicbarstart = "{topicsbstart}";
    topicbarend = "{topicsbend}";

    # treated "normally", you could change the time/user name to whatever
    time = "{sb $Z}";
    user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";

    # treated specially .. window is printed with non-empty windows,
    # window_empty is printed with empty windows
    window = "{sb $winref:$tag/$itemname{sbmode $M}}";
    window_empty = "{sb $winref{sbservertag $tag}}";
    prompt = "{prompt $[.15]itemname}";
    prompt_empty = "{prompt $winname}";
    topic = " $topic";
    topic_empty = " Irssi v$J - http://irssi.org/help/";

    # all of these treated specially, they're only displayed when needed
    lag = "{sb Lag: $0-}";
    act = "{sb Act: $0-}";
    more = "-- more --";
  };

  # there's two type of statusbars. root statusbars are either at the top
  # of the screen or at the bottom of the screen. window statusbars are at
  # the top/bottom of each split window in screen.
  default = {
    # the "default statusbar" to be displayed at the bottom of the window.
    # contains all the normal items.
    window = {
      disabled = "no";

      # window, root
      type = "window";
      # top, bottom
      placement = "bottom";
      # number
      position = "1";
      # active, inactive, always
      visible = "active";

      # list of items in statusbar in the display order
      items = {
        barstart = { priority = "100"; };
        time = { };
        user = { };
        window = { };
        window_empty = { };
        lag = { priority = "-1"; };
        act = { priority = "10"; };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # statusbar to use in inactive split windows
    window_inact = {
      type = "window";
      placement = "bottom";
      position = "1";
      visible = "inactive";
      items = {
        barstart = { priority = "100"; };
        window = { };
        window_empty = { };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # we treat input line as yet another statusbar :) It's possible to
    # add other items before or after the input line item.
    prompt = {
      type = "root";
      placement = "bottom";
      # we want to be at the bottom always
      position = "100";
      visible = "always";
      items = {
        prompt = { priority = "-1"; };
        prompt_empty = { priority = "-1"; };
        # treated specially, this is the real input line.
        input = { priority = "10"; };
      };
    };

    # topicbar
    topic = {
      type = "root";
      placement = "top";
      position = "1";
      visible = "always";
      items = {
        topicbarstart = { priority = "100"; };
        topic = { };
        topic_empty = { };
        topicbarend = { priority = "100"; alignment = "right"; };
      };
    };
  };
};
settings = {
  core = {
    real_name = "";
    user_name = "user";
    nick = "user";
  };
  "fe-text" = { actlist_sort = "refnum"; };
};

이렇게 되있다...

 

여기에서,

 

아래에 첨부된 부분만 수정해주면 된다...

 

servers = (
{
    address = "irc.hanirc.org";
    chatnet = "HanIRC";
    port = "6667";
    autoconnect = "yes";
  },
  { address = "iz4u.hanirc.org"; chatnet = "HanIRC"; port = "8080"; },
  {
    address = "holywar.hanirc.org";
    chatnet = "HanIRC";
    port = "6664";
  }
);

chatnets = {
  HanIRC = {
    type = "IRC";
    autosendcmd = "/mode $N +iwxg;
/^msg chanserv auth #채널 아이디 비번;";
  };
};

channels = (
  { name = "#자동조인 할 채널1"; chatnet = "HanIRC"; autojoin = "Yes"; },
  { name = "#자동조인 할 채널2"; chatnet = "HanIRC"; autojoin = "YES"; },
  {
    name = "#m";
    chatnet = "HanIRC";
    autojoin = "No";
    password = "passwd";
  },
  {
    name = "#Channel_04";
    chatnet = "HanIRC";
    autojoin = "No";
    password = "passwd";
  }
);

 

settings = {
  core = {
    real_name = "Irssi";
    user_name = "유져이름";
    nick = "닉네임";
  };