home *** CD-ROM | disk | FTP | other *** search
/ ftp.madoka.org / 2014.12.ftp.madoka.org.tar / ftp.madoka.org / pub / plum / 1.x / plum10b8.lzh / plum10b8 / module.doc < prev    next >
Text File  |  1997-06-25  |  10KB  |  291 lines

  1. plum module manual
  2.  
  3.  
  4. 1. plumñ╬ÑΓÑ╕Ñσí╝Ñδ
  5.  
  6.   plumñ╧ñ╜ñ╬ñ█ñ╚ñ≤ñ╔ñ╬╡í╟╜ñ≥ÑΓÑ╕Ñσí╝Ñδñ╦ñΦñ├ñ╞╝┬╕╜ñ╖ñ╞ñññ▐ñ╣íú
  7.  
  8.   ╔ß─╠ñ╦╛∩├≤ñ╣ñδñ╬ñ╦╔¼═╫ñ╩ÑΓÑ╕Ñσí╝Ñδñ╧ñóñΘñ½ñ╕ñß═╤░╒ñ╡ñ∞ñ╞ñññδñ╬ñ╟íó
  9.   ╔¼═╫ñ╩╡í╟╜ñ≥╗²ñ─ÑΓÑ╕Ñσí╝Ñδñ≥┴╚ñ▀╣■ñ≤ñ╟╗╚ñ├ñ╞▓╝ñ╡ññíú
  10.  
  11.   ñ▐ñ┐íóplumñ╬ÑΓÑ╕Ñσí╝Ñδñ╧╚µ│╙┼¬┤╩├▒ñ╩╣╜┬ññ╦ñ╩ñ├ñ╞ñññδñ╬ñ╟íó
  12.   ╝½╩¼ñ╟┐╖ñ╖ññ╡í╟╜ñ¼═▀ñ╖ñ»ñ╩ñ├ñ┐ñ╚ñ¡ñ╦ñΓ╝½║εñ╬ÑΓÑ╕Ñσí╝Ñδñ≥┤╩├▒ñ╦
  13.   ─╔▓├ñ╣ñδñ│ñ╚ñ¼ñ╟ñ¡ñ▐ñ╣íú
  14.  
  15.  
  16. 2. ÑΓÑ╕Ñσí╝Ñδ░∞═≈
  17.  
  18.   ╕╜║▀plumñ╦╔╒┬░ñ╖ñ╞ñññδÑΓÑ╕Ñσí╝Ñδñ╬░∞═≈ñ╟ñ╣íú
  19.  
  20.   * autojoin.plm  Ñ┴ÑπÑ≤Ñ═Ñδñ╦╝½╞░┼¬ñ╦JOINñ╣ñδ
  21.   * autoload.plm  .plumrcñ¼╩╤╣╣ñ╡ñ∞ñ┐ñ╚ñ¡ñ╦╞╔ñ▀╣■ñ▀─╛ñ╣
  22.   * awaynick.plm  Ñ╦Ñ├Ñ»Ñ═í╝Ñαñ╦╣τñ∩ñ╗ñ╞AWAYñ≥└▀─Ωñ╣ñδ
  23.   * config.plm    ╕╜║▀ñ╬└▀─Ωñ≥╔╜╝¿ñ╣ñδ
  24.   * ctcp.plm      CTCPÑßÑ├Ñ╗í╝Ñ╕ñ≥╜Φ═²ñ╣ñδ
  25.   * dailylog.plm  1╞ⁿñ┤ñ╚ñ╬ÑφÑ░ñ≥ñ╚ñδ
  26.   * dccgate.plm   DCC SEND/GETñ≥├µ╖╤ñ╣ñδ
  27.   * dccget.plm    DCC SENDñ≥╝½╞░┼¬ñ╦╝⌡┐«ñ╣ñδ
  28.   * dynaload.plm  ÑΓÑ╕Ñσí╝Ñδñ¼╩╤╣╣ñ╡ñ∞ñ┐ñ╚ñ¡ñ╦╞╔ñ▀╣■ñ▀─╛ñ╣
  29.   * fork.plm      ╡»╞░╗■ñ╦Ñ╨Ñ├Ñ»Ñ░ÑΘѪÑ≤Ñ╔ñ╟╝┬╣╘ñ╣ñδ
  30.   * invite.plm    INVITEñ╡ñ∞ñ┐ñ╚ñ¡ñ╦JOINñ╣ñδ
  31.   * main.plm      IRCñ╦╛∩├≤ñ╣ñδ
  32.   * newoper.plm   ñ╩ñδñ╚ñ≥╟█ñδ
  33.   * noisybot.plm  ╞├─Ωñ╬ÑßÑ├Ñ╗í╝Ñ╕ñ╦╚┐▒■ñ╖ñ╞ÑßÑ├Ñ╗í╝Ñ╕ñ≥┴≈ñδ
  34.   * show.plm      ╞■╬╧ñ╖ñ┐╝░ñ≥╔╛▓┴ñ╣ñδ
  35.   * taillog.plm   ─╛┴░ñ╬ÑφÑ░ñ≥╔╜╝¿ñ╣ñδ
  36.   * version.plm   CTCPÑ╨í╝Ñ╕ÑτÑ≤ñ≥╩╓ñ╣
  37.   * yuurii.plm    ñµí╝ñΩñúñ╬Ñ¿Ñ▀ÑσÑ∞í╝Ñ╖ÑτÑ≤
  38.  
  39.  
  40. 3. ÑΓÑ╕Ñσí╝Ñδñ╬▓≥└Γ
  41.  
  42.   plumñ╦╔╒┬░ñ╖ñ╞ñññδÑΓÑ╕Ñσí╝Ñδñ╬▓≥└Γñ╚íó.plumrcñ╦╗╪─Ωñ╣ñδÑ╫ÑφÑ╤Ñ╞Ñúñ╬
  43.   ▓≥└Γñ╟ñ╣íú
  44.  
  45.   * autojoin.plm
  46.     Ñ╡í╝Ñ╨ñ╦└▄┬│ñ╖ñ┐ñ╚ñ¡ñ╦╗╪─Ωñ╖ñ┐Ñ┴ÑπÑ≤Ñ═Ñδñ╦╝½╞░┼¬ñ╦JOINñ╖ñ▐ñ╣íú
  47.     ñ▐ñ┐íóKICKñ╡ñ∞ñ╞ñΓÑ┴ÑπÑ≤Ñ═Ñδñ╦JOINñ╖ñ▐ñ╣íú
  48.  
  49.       > channel: #ñ█ñ¿ñ█ñ¿
  50.       > channel: #ñ╤ñΦñ╤ñΦ:*.jp
  51.       > channel: %ñ▐ñ╦ñτñ▐ñ╦ñτ
  52.  
  53.   * autoload.plm
  54.     .plumrcñ¼╩╤╣╣ñ╡ñ∞ñ┐ñ╚ñ¡ñ╦íó╝½╞░┼¬ñ╦╞╔ñ▀╣■ñ▀─╛ñ╖ñ▐ñ╣íú
  55.     ñ┐ñ└ñ╖plumñ╬╛⌡┬╓ñ≥╩╤╣╣ñ╣ñδñ∩ñ▒ñ╟ñ╧ñ╩ñññ╬ñ╟├φ░╒ñ╖ñ╞▓╝ñ╡ññíú
  56.     (client:ñ╬Ñ▌í╝Ñ╚╚╓╣µñ≥╩╤ñ¿ñ┐ñΩñ╣ñδñ╚╕┼ññÑ▌í╝Ñ╚ñ≥│½ñ¡ñ├ñ╤ñ╩ñ╖ñ╦ñ╖ñ▐ñ╣)
  57.  
  58.   * awaynick.plm
  59.     Ñ╦Ñ├Ñ»Ñ═í╝Ñαñ≥╩╤╣╣ñ╖ñ┐ñ╚ñ¡ñ╦íóñ╜ñ∞ñ╦┬╨▒■ñ╖ñ┐AWAYñ≥└▀─Ωñ╖ñ▐ñ╣íú
  60.     └▀─Ωñ╡ñ∞ñ╞ñññ╩ññÑ╦Ñ├Ñ»Ñ═í╝Ñαñ╦╩╤╣╣ñ╖ñ┐ñ╚ñ¡ñ╧AWAYñ≥╝ΦñΩ╛├ñ╖ñ▐ñ╣íú
  61.  
  62.       > nick: plum_Zzz ñ¬ñΣñ╣ñ▀ñ┴ñσñªñ╟ñ╣
  63.       > nick: plum_away ñ¬ñ╟ñ½ñ▒ñ╖ñ╞ñ▐ñ╣
  64.  
  65.   * config.plm
  66.     ╕╜║▀ñ╬╝┬╣╘┤─╢¡ñ╬╛≡╩≤ñ≥╔╜╝¿ñ╖ñ▐ñ╣íúñ│ñ╬ÑΓÑ╕Ñσí╝Ñδñ≥┴╚ñ▀╣■ñαñ╚plumñ╧
  67.     ñññ»ñ─ñ½ñ╬Ñ╟í╝Ñ┐ñ≥╔╜╝¿ñ╖ñ╞╜¬╬╗ñ╖ñ▐ñ╣íú
  68.     plumñ¼ñªñ▐ñ»╝┬╣╘ñ╟ñ¡ñ╩ñññ╚ñ¡ñ╧ñ│ñ╬Ñ╟í╝Ñ┐ñ≥╢╡ñ¿ñ╞▓╝ñ╡ññíú
  69.  
  70.   * ctcp.plm
  71.     ÑßÑ├Ñ╗í╝Ñ╕ñ½ñΘCTCPñ≥╝ΦñΩ╜╨ñ╖ñ╞┬╛ñ╬ÑΓÑ╕Ñσí╝Ñδñ╦┼╧ñ╗ñδñΦñªñ╦ñ╖ñ▐ñ╣íú
  72.     CTCPñ≥╗╚ñªÑΓÑ╕Ñσí╝Ñδ(dccget.plm/dccgate.plm/version.plm)ñ≥═°═╤ñ╣ñδ
  73.     ╛∞╣τñ╧╔¼ñ║┴╚ñ▀╣■ñ≤ñ╟▓╝ñ╡ññíú
  74.  
  75.   * dailylog.plm
  76.     ░∞╞ⁿñ┤ñ╚ñ╬ÑφÑ░ñ≥╡¡╧┐ñ╖ñ▐ñ╣íú╡¡╧┐ñ╣ñδñ╬ñ╧ÑßÑ├Ñ╗í╝Ñ╕ñ╩ñ╔ñ╬╔¼═╫ñ╚
  77.     ╗╫ñ∩ñ∞ñδ╛≡╩≤ñ└ñ▒ñ╟ñ╣íú
  78.  
  79.       > dailylog: ~/irc/log/log%y%m%d
  80.       > logheader: %h:%m:%s
  81.       > filemode: 600
  82.  
  83.     dailylogñ╬%yíó%míó%dñ╧ñ╜ñ∞ñ╛ñ∞╟»íó╖εíó╞ⁿñ╦╩╤┤╣ñ╡ñ∞ñ▐ñ╣íú
  84.     logheaderñ╬%híó%míó%sñ╧ñ╜ñ∞ñ╛ñ∞╗■íó╩¼íó╔├ñ╦╩╤┤╣ñ╡ñ∞ñ▐ñ╣íú
  85.  
  86.   * dccgate.plm
  87.     DCCñ╬Ñ╒ÑíÑñÑδñ╬┴≈╝⌡┐«ñ≥├µ╖╤ñ╖ñ▐ñ╣íúÑ╒ÑíÑñÑóѪÑ⌐í╝Ñδñ¼ñóñδ╛∞╣τñ╧íó
  88.     Ñ╒ÑíÑñÑóѪÑ⌐í╝Ñδ╛σñ╟dccgate.plmñ≥┴╚ñ▀╣■ñ≤ñ└plumñ≥╞░ñ½ñ╗ñ╨íó
  89.     Ñ╒ÑíÑñÑóѪÑ⌐í╝Ñδñ╬╞Γ│░ñ╟DCCñ╬Ñ╒ÑíÑñÑδñ╬┴≈╝⌡┐«ñ¼ñ╟ñ¡ñ▐ñ╣íú
  90.  
  91.   * dccget.plm
  92.     DCCñ╬Ñ╒ÑíÑñÑδñ╬┴≈┐«ñ≥╝½╞░┼¬ñ╦╝⌡┐«ñ╖ñ▐ñ╣íú
  93.     ╞▒ñ╕Ñ╒ÑíÑñÑδ╠╛ñ¼ñ╣ñ╟ñ╦┬╕║▀ñ╣ñδ╛∞╣τñ╧╩╠ñ╬Ñ╒ÑíÑñÑδ╠╛ñ╟╩▌┬╕ñ╖ñ▐ñ╣íú
  94.  
  95.       > dccget: ~/tmp
  96.       > filemode: 600
  97.       > dirmode: 700
  98.  
  99.   * dynaload.plm
  100.     ÑΓÑ╕Ñσí╝Ñδñ¼╩╤╣╣ñ╡ñ∞ñ┐ñ╚ñ¡ñ╦╝½╞░┼¬ñ╦╞╔ñ▀╣■ñ▀─╛ñ╖ñ▐ñ╣íú
  101.     ÑΓÑ╕Ñσí╝Ñδ╞Γñ╬░∞├╢┤╪┐⌠ñ╧┴┤ñ╞╛├ñ╡ñ∞ñ▐ñ╣ñ¼íó╩╤┐⌠ñ╧╞╔ñ▀╣■ñ▀─╛ñ╣
  102.     ┴░ñ╬├═ñ¼ñ╜ñ╬ñ▐ñ▐╗─ñΩñ▐ñ╣íú
  103.  
  104.   * fork.plm
  105.     plumñ≥Ñ╨Ñ├Ñ»Ñ░ÑΘѪÑ≤Ñ╔ñ╟╝┬╣╘ñ╖ñ▐ñ╣íú
  106.  
  107.   * invite.plm
  108.     INVITEñ╡ñ∞ñ┐ñ╚ñ¡ñ╦ñ╜ñ╬Ñ┴ÑπÑ≤Ñ═Ñδñ╦JOINñ╖ñ▐ñ╣íú
  109.     Ñ╫ÑφÑ╤Ñ╞Ñúñ╧Ñ┴ÑπÑ≤Ñ═Ñδ╠╛ñ╚ѵí╝Ñ╢í╝╠╛ñ╬ñ╔ñ┴ñΘñ╟ñΓ╗╪─Ωñ╟ñ¡ñ▐ñ╣íú
  110.  
  111.       > invite: #ñ█ñ▓ñ█ñ▓
  112.       > invite: pupu*!pupu@*.eds.ecip.nagoya-u.ac.jp
  113.  
  114.   * main.plm
  115.     IRCñ╦╛∩├≤ñ╣ñδñ╬ñ╦╔¼═╫ñ╩╜Φ═²ñ≥╣╘ñññ▐ñ╣íú
  116.     ñ│ñ╬ÑΓÑ╕Ñσí╝Ñδñ└ñ▒ñ╧║╟─π╕┬┴╚ñ▀╣■ñ≤ñ╟▓╝ñ╡ññíú
  117.  
  118.   * newoper.plm
  119.     Ñ┴ÑπÑ≤Ñ═Ñδñ╦JOINñ╖ñ╞ñ¡ñ┐┐═ñ≥ѬÑ┌Ñ∞í╝Ñ┐í╝ñ╦ñ╖ñ▐ñ╣íú
  120.  
  121.       > newoper: pupu*!pupu@*.eds.ecip.nagoya-u.ac.jp
  122.       > newoper: cookie*!cookie@*.eds.ecip.nagoya-u.ac.jp
  123.  
  124.   * noisybot.plm
  125.     ╞├─Ωñ╬ÑßÑ├Ñ╗í╝Ñ╕ñ≥╝⌡┐«ñ╖ñ┐ñ╚ñ¡ñ╦íó┬╨▒■ñ╣ñδÑßÑ├Ñ╗í╝Ñ╕ñ≥╩╓ñ╖ñ▐ñ╣íú
  126.     ╠╛┴░ñ╬─╠ñΩñªñδñ╡ñññ╬ñ╟ñóñ▐ñΩñ¬ñ╣ñ╣ñßñ╖ñ▐ñ╗ñ≤íú
  127.  
  128.       > noisybot: ñ╫ñΘñα ñ╧í┴ññí∙
  129.       > noisybot: ñ▄ñ├ñ╚ ñ▄ñ├ñ╚ñ╕ñπñ╩ñññΓñ≤
  130.  
  131.   * show.plm
  132.     ╗╪─Ωñ╖ñ┐╝░ñ≥╝┬╣╘ñ╖ñ╞íóñ╜ñ╬╖δ▓╠ñ≥NOTICEñ╟╩╓ñ╖ñ▐ñ╣íúñ│ñ╬ÑΓÑ╕Ñσí╝Ñδñ≥
  133.     ┴╚ñ▀╣■ñαñ╚íóSHOWñ╚ñññªÑ│Ñ▐Ñ≤Ñ╔ñ¼╗╚ñ¿ñδñΦñªñ╦ñ╩ñΩñ▐ñ╣íú
  134.     ñ│ñ∞ñ╧íó/SHOW 1+2 ñ╬ñΦñªñ╦╗╚ñññ▐ñ╣íú
  135.     ┤≡╦▄┼¬ñ╦Ñ╟Ñ╨Ñ├Ñ░═╤ñ╩ñ╬ñ╟╔ß─╠ñ╧┴╚ñ▀╣■ñα╔¼═╫ñ╧ñóñΩñ▐ñ╗ñ≤íú
  136.  
  137.   * taillog.plm
  138.     Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ≥└▄┬│ñ╣ñδ─╛┴░ñ╬ÑφÑ░ñ≥╔╜╝¿ñ╖ñ▐ñ╣íú
  139.  
  140.       > taillog: 50
  141.       > logheader: %h:%m:%s
  142.  
  143.     logheaderñ╬%híó%míó%sñ╧ñ╜ñ∞ñ╛ñ∞╗■íó╩¼íó╔├ñ╦╩╤┤╣ñ╡ñ∞ñ▐ñ╣íú
  144.  
  145.   * version.plm
  146.     CTCP VERSIONñ≥╝⌡ñ▒╝Φñ├ñ┐ñ╚ñ¡ñ╦íóplumñ╚perlñ╬Ñ╨í╝Ñ╕ÑτÑ≤ñ≥╩╓ñ╖ñ▐ñ╣íú
  147.  
  148.   * yuurii.plm
  149.     pirc bot ñµí╝ñΩñúñ╬Ñ¿Ñ▀ÑσÑ∞í╝Ñ╖ÑτÑ≤ñ≥╣╘ñññ▐ñ╣íúñµí╝ñΩñú═╤ñ╬
  150.     .pluginrcñ╚plug-inñ¼ñ╜ñ╬ñ▐ñ▐╗╚ñ¿ñ▐ñ╣íú╕╜║▀Ñ¿Ñ▀ÑσÑ∞í╝Ñ╚ñ╖ñ╞ñññδñ╬ñ╧
  151.     yuurii 1.6.2ñ╟ñ╣íú
  152.  
  153.       > yuurii: .pluginrc
  154.  
  155.  
  156. 4. ÑΓÑ╕Ñσí╝Ñδñ╬║εñΩ╩²
  157.  
  158.   plumñ≥ñ╖ñ╨ñΘñ»╗╚ñ├ñ╞ñññδñ╚íó╝½╩¼ñ╟ñΓÑΓÑ╕Ñσí╝Ñδñ¼║εñΩñ┐ñ»ñ╩ñδñ½ñΓñ╖ñ∞
  159.   ñ▐ñ╗ñ≤íú
  160.  
  161.   plumñ╦╔╒┬░ñ╖ñ╞ñññδÑΓÑ╕Ñσí╝Ñδñ≥╕½ñδñ╚ñ∩ñ½ñδñ╚╗╫ñññ▐ñ╣ñ¼íóplumñ╬
  162.   ÑΓÑ╕Ñσí╝Ñδñ╦ñ╧ñóñδ╖Φñ▐ñ├ñ┐╜±╝░ñ¼ñóñΩñ▐ñ╣íúñ╜ñ∞ñ╧íó
  163.  
  164.     package sample;
  165.     $_ = 'sample';
  166.  
  167.   ñ╚ñññªñΓñ╬ñ╟ñ╣íúñ│ñ∞ñ╧plumñ╦sampleÑ╤Ñ├Ñ▒í╝Ñ╕ñ≥╗╚═╤ñ╣ñδñ╚ñññªñ│ñ╚ñ≥
  168.   └δ╕└ñ╣ñδñΓñ╬ñ╟ñ╣íúsampleñ╬╔⌠╩¼ñ╧ÑΓÑ╕Ñσí╝Ñδñ┤ñ╚ñ╦╞╔ñ▀ñ½ñ¿ñ╞▓╝ñ╡ññíú
  169.  
  170.   ║╟─π╕┬íóñ│ñ╬2╣╘ñ¼ñóñ∞ñ╨plumñ╬ÑΓÑ╕Ñσí╝Ñδñ╚ñ╖ñ╞╟º╝▒ñ╡ñ∞ñ▐ñ╣íú
  171.   ╩╤┐⌠ñ╬╜Θ┤ⁿ▓╜ñ╩ñ╔ñ╧╔¼ñ║ñ│ñ╬2╣╘ñ╬┤╓ñ╟╣╘ñªñΦñªñ╦ñ╖ñ╞▓╝ñ╡ññíú
  172.  
  173.   plumñ╬ÑΓÑ╕Ñσí╝Ñδñ╧┤≡╦▄┼¬ñ╦Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ╬╜╕╣τñ╟ñ╣íúñ│ñ∞ñΘñ╬Ñ╡Ñ╓Ñδí╝
  174.   Ñ┴Ñ≤ñ╦ñ╧ñ╜ñ∞ñ╛ñ∞╖Φñ▐ñ├ñ┐╠╛┴░ñ¼╔╒ñññ╞ñ¬ñΩíóplumñ¼▓┐ñ½╜Φ═²ñ≥╣╘ñªñ╚ñ¡
  175.   ñ╦íóñ╜ñ∞ñ╦▒■ñ╕ñ┐Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ¼╝┬╣╘ñ╡ñ∞ñ▐ñ╣íú
  176.  
  177.   ñ╜ñ∞ñ╛ñ∞ñ╬ÑΓÑ╕Ñσí╝Ñδñ╟ñ╧╔¼═╫ñ╦▒■ñ╕ñ╞Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ≥║εñ├ñ╞ñ¬ñ▒ñ╨íó
  178.   plumñ¼╝½╞░┼¬ñ╦ñ╜ñ∞ñΘñ≥╝┬╣╘ñ╖ñ╞ñ»ñ∞ñ▐ñ╣íú
  179.  
  180.   plumñ¼╝┬╣╘ñ╣ñδÑ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ╦ñ╧░╩▓╝ñ╬ñΦñªñ╩ñΓñ╬ñ¼ñóñΩñ▐ñ╣íú
  181.  
  182.     server_open   Ñ╡í╝Ñ╨ñ╪ñ╬Ñ∞Ñ╕Ñ╣Ñ╚Ñ∞í╝Ñ╖ÑτÑ≤ñ¼┤░╬╗ñ╖ñ┐ñ╚ñ¡íú
  183.                   (Ñ╡í╝Ñ╨ñ╪PASSíóNICKíóUSERñ≥┴≈ñΩíó001ñ≥╝⌡┐«ñ╖ñ┐ñ╚ñ¡)
  184.     server_close  Ñ╡í╝Ñ╨ñ╚ñ╬└▄┬│ñ¼└┌├╟ñ╡ñ∞ñ┐ñ╚ñ¡íú
  185.     client_open   Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ╬Ñ∞Ñ╕Ñ╣Ñ╚Ñ∞í╝Ñ╖ÑτÑ≤ñ¼┤░╬╗ñ╖ñ┐ñ╚ñ¡íú
  186.                   (Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ½ñΘ└╡ñ╖ññPASSíóNICKíóUSERñ¼┴≈ñΘñ∞ñ╞ñ¡ñ┐ñ╚ñ¡)
  187.     client_close  Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ╚ñ╬└▄┬│ñ¼└┌├╟ñ╡ñ∞ñ┐ñ╚ñ¡íú
  188.     main_loop     ÑßÑñÑ≤Ñδí╝Ñ╫ñ≥╜Φ═²ñ╣ñδñ╚ñ¡íú
  189.     ss_????       Ñ╡í╝Ñ╨ñ½ñΘñ╬│╞Ñ│Ñ▐Ñ≤Ñ╔ñ╬╞■╬╧ñ¼ñóñ├ñ┐ñ╚ñ¡íú
  190.     sp_????       Ñ╡í╝Ñ╨ñ╪│╞Ñ│Ñ▐Ñ≤Ñ╔ñ≥╜╨╬╧ñ╣ñδñ╚ñ¡íú
  191.     cs_????       Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ½ñΘ│╞Ñ│Ñ▐Ñ≤Ñ╔ñ╬╞■╬╧ñ¼ñóñ├ñ┐ñ╚ñ¡íú
  192.     cp_????       Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ╪│╞Ñ│Ñ▐Ñ≤Ñ╔ñ≥╜╨╬╧ñ╣ñδñ╚ñ¡íú
  193.  
  194.   ctcp.plmñ≥ÑñÑ≤Ñ▌í╝Ñ╚ñ╣ñδñ╚░╩▓╝ñ╬Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñΓ╝┬╣╘ñ╡ñ∞ñ▐ñ╣íú
  195.  
  196.     xss_????      Ñ╡í╝Ñ╨ñ½ñΘ│╞CTCPñ╬╞■╬╧ñ¼ñóñ├ñ┐ñ╚ñ¡íú
  197.     xsp_????      Ñ╡í╝Ñ╨ñ╪│╞CTCPñ≥╜╨╬╧ñ╣ñδñ╚ñ¡íú
  198.     xcs_????      Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ½ñΘ│╞CTCPñ╬╞■╬╧ñ¼ñóñ├ñ┐ñ╚ñ¡íú
  199.     xcp_????      Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ╪│╞CTCPñ≥╜╨╬╧ñ╣ñδñ╚ñ¡íú
  200.  
  201.   ÑΓÑ╕Ñσí╝Ñδñ╦Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ¼1ñ─ñΓñ╩ññ(╩╤┐⌠ñ╬╜Θ┤ⁿ▓╜ñ└ñ▒ñ╬ñΦñªñ╩)╛∞╣τñ╧
  202.   Ñ╤Ñ├Ñ▒í╝Ñ╕╠╛ñ╦mainñ≥╗╪─Ωñ╖ñ╞ñΓñ½ñ▐ñññ▐ñ╗ñ≤íú(ñ╔ñ┴ñΘñ½ñ╚╕└ñªñ╚íóñ╜ñªñ╖ñ┐
  203.   ╩²ñ¼ñññññ╟ñ╣)
  204.  
  205.   ñ│ñ∞ñΘñ╬Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ╦┼╧ñ╡ñ∞ñδ╩╤┐⌠ñ╧░╩▓╝ñ╬ñΦñªñ╦ñ╩ñ├ñ╞ñññ▐ñ╣íú
  206.  
  207.     server_open(SERVERNO)
  208.     server_close(SERVERNO)
  209.     client_open(CLIENTNO)
  210.     client_close(CLIENTNO)
  211.     main_loop(USERNO)
  212.     ss_????(SERVERNO, PREFIX, COMMAND, PARAMS)
  213.     sp_????(SERVERNO, PREFIX, COMMAND, PARAMS)
  214.     cs_????(CLIENTNO, PREFIX, COMMAND, PARAMS)
  215.     cp_????(CLIENTNO, PREFIX, COMMAND, PARAMS)
  216.     xss_????(SERVERNO, PREFIX, CTCP, PARAMS)
  217.     xsp_????(SERVERNO, PREFIX, CTCP, PARAMS)
  218.     xcs_????(CLIENTNO, PREFIX, CTCP, PARAMS)
  219.     xcp_????(CLIENTNO, PREFIX, CTCP, PARAMS)
  220.  
  221.     SERVERNO  Ñ╡í╝Ñ╨ñ╬Ñ╒ÑíÑñÑδ╚╓╣µ
  222.     CLIENTNO  Ñ»ÑΘÑñÑóÑ≤Ñ╚ñ╬Ñ╒ÑíÑñÑδ╚╓╣µ
  223.     USERNO    Ñµí╝Ñ╢╚╓╣µ
  224.     PREFIX    IRCÑ╫ÑφÑ╚Ñ│Ñδñ╬Ñ╫Ñ∞Ñ╒ÑúÑ»Ñ╣(nick!user@host.domainñ╬╔⌠╩¼)
  225.     COMMAND   IRCÑ╫ÑφÑ╚Ñ│Ñδñ╬Ñ│Ñ▐Ñ≤Ñ╔(JOIN/PART/PRIVMSGñ╩ñ╔)
  226.     CTCP      CTCPÑ│Ñ▐Ñ≤Ñ╔(PING/FINGER/VERSIONñ╩ñ╔)
  227.     PARAMS    IRCÑ╫ÑφÑ╚Ñ│Ñδñ╬╗─ñΩñ╬╔⌠╩¼(ñ│ñ∞ñ└ñ▒ñ╧╟█╬≤ñ╟ñ╣)
  228.  
  229.   ñ│ñ╬ñªñ┴íó║╟╕σñ╬8ñ─ñ╬Ñ╡Ñ╓Ñδí╝Ñ┴Ñ≤ñ╧╠ßñΩ├═ñ╚ñ╖ñ╞┼╧ñ╡ñ∞ñ┐IRCÑ╫ÑφÑ╚Ñ│Ñδñ≥
  230.   ╩╓ñ╖ñ╞▓╝ñ╡ññ(PREFIX, COMMAND/CTCP, PARAMSñ└ñ▒ñ╟ñ╣íúSERVERNO/CLIENTNO
  231.   ñ╧ñññΩñ▐ñ╗ñ≤)íúñ│ñ╬ñ╚ñ¡PREFIXñ╚PARAMSñ╧╩╤╣╣ñ╖ñ╞ñΓñ½ñ▐ñññ▐ñ╗ñ≤íú
  232.  
  233.  
  234. 5. Ñ╡Ñ≤Ñ╫ÑδÑΓÑ╕Ñσí╝Ñδ
  235.  
  236.   └Γ╠└ñ└ñ▒ñ╟ñ╧ñ∩ñ½ñΩñ╦ñ»ñññ╚╗╫ñªñ╬ñ╟íóñññ»ñ─ñ½Ñ╡Ñ≤Ñ╫ÑδÑΓÑ╕Ñσí╝Ñδñ≥
  237.   ╜±ñññ╞└Γ╠└ñ╖ñ▐ñ╣íú
  238.  
  239.       # dailyfork.plm
  240.      1: package dailyfork;
  241.      2: $day = (localtime(time))[3];
  242.      3: $_ = 'dailyfork';
  243.      4: 
  244.      5: sub main_loop {
  245.      6:   local($userno) = @_;
  246.      7:   local($today) = (localtime(time))[3];
  247.      8:   if ($day != $today) {
  248.      9:     $day = $today;
  249.     10:     exit if fork;
  250.     11:   }
  251.     12: }
  252.  
  253.   ñ│ñ∞ñ╧1╞ⁿñ┤ñ╚ñ╦forkñ╣ñδÑΓÑ╕Ñσí╝Ñδñ╟ñ╣íú║╟╜Θñ╦╞╔ñ▀╣■ñ▐ñ∞ñ┐ñ╚ñ¡ñ╦
  254.   1í┴3╣╘╠▄ñ¼╝┬╣╘ñ╡ñ∞ñ▐ñ╣íúñ│ñ╬ñªñ┴1╣╘╠▄ñ╚3╣╘╠▄ñ╧╖Φñ▐ñΩ╩╕╢τñ╟íó
  255.   2╣╘╠▄ñ╟╕╜║▀ñ╬╞ⁿ╔╒ñ≥$dayñ╦└▀─Ωñ╖ñ╞ñññ▐ñ╣íú
  256.  
  257.   sub main_loopñ╧plumñ¼ÑßÑñÑ≤Ñδí╝Ñ╫ñ≥1▓≤╜Φ═²ñ╣ñδñ┐ñ╙ñ╦1▓≤╝┬╣╘ñ╡ñ∞ñ▐ñ╣íú
  258.   7╣╘╠▄ñ╟╕╜║▀ñ╬╞ⁿ╔╒ñ≥$todayñ╦└▀─Ωñ╖íó8╣╘╠▄ñ╟░╩┴░ñ╦└▀─Ωñ╖ñ┐$dayñ╬├═ñ╚
  259.   ╚µ│╙ñ╖íóñ╜ñ∞ñ¼░πñª├═ñ╩ñΘ(╝íñ╬╞ⁿñ╦ñ╩ñ├ñ┐ñΘ)íóforkñ╖ñ╞┐╞Ñ╫ÑφÑ╗Ñ╣ñ╧
  260.   ╜¬╬╗ñ╖ñ▐ñ╣íú
  261.  
  262.       # autokick.plm
  263.      1: package autokick;
  264.      2: $_ = 'autokick';
  265.      3: 
  266.      4: sub ss_join {
  267.      5:   local($serverno, $prefix, $cmd, $chan) = @_;
  268.      6:   local($nick, $user, $host) = &'prefix($prefix);
  269.      7:   local($regex) = &'regex('*!*@*.jp');
  270.      8:   if (&'exist($'nameslist{$'userno[$serverno], $chan},
  271.      9:               "\@$'nick[$serverno]")) {
  272.     10:     if ($prefix !~ /$regex/i) {
  273.     11:       &'s_print($serverno, '', 'KICK', $chan, $nick);
  274.     12:     }
  275.     13:   }
  276.     14:   return ($prefix, $cmd, $chan);
  277.     15: }
  278.  
  279.   ñ│ñ╬ÑΓÑ╕Ñσí╝Ñδñ╧Ñ┴ÑπÑ≤Ñ═Ñδñ╦JOINñ╖ñ╞ñ¡ñ┐┐═ñ¼*!*@*.jpñ╦Ñ▐Ñ├Ñ┴
  280.   ñ╖ñ╩ñ½ñ├ñ┐ñ╚ñ¡ñ╦íóñ╜ñ╬┐═ñ≥Ñ¡Ñ├Ñ»ñ╣ñδÑΓÑ╕Ñσí╝Ñδñ╟ñ╣íú
  281.  
  282.   ss_joinñ╧Ñ╡í╝Ñ╨ñ½ñΘJOINñ¼┴≈ñΘñ∞ñ╞ñ¡ñ┐ñ╚ñ¡ñ╦╝┬╣╘ñ╡ñ∞ñ▐ñ╣íú
  283.   6╣╘╠▄ñ╧nick!user@hostnameñ≥nickíóuseríóhostñ╦╩¼▓≥ñ╖ñ▐ñ╣
  284.   7╣╘╠▄ñ╧*!*@*.jpñ╦┬╨▒■ñ╣ñδ└╡╡¼╔╜╕╜ñ≥╝Φ╞└ñ╖ñ▐ñ╣íúñ│ñ╬╛∞╣τñ╧
  285.   $regexñ╧.*\!.*\@.*\.jpñ╦ñ╩ñΩñ▐ñ╣íú
  286.   8íó9╣╘╠▄ñ╧╝½╩¼ñ¼ñ╜ñ╬Ñ┴ÑπÑ≤Ñ═Ñδñ╟ñ╩ñδñ╚ñ≥╗²ñ├ñ╞ñññδñ½ñ╔ñªñ½│╬╟ºñ╖ñ▐ñ╣íú
  287.   10╣╘╠▄ñ╟Ñ╤Ñ┐í╝Ñ≤Ñ▐Ñ├Ñ┴ñ≥╣╘ññíó11╣╘╠▄ñ╟Ñ╡í╝Ñ╨ñ╦KICKñ≥┴≈ñΩñ▐ñ╣íú
  288.   14╣╘╠▄ñ╟╠ßñΩ├═ñ≥╩╓ñ╖ñ▐ñ╣íúñ│ñ╬ÑΓÑ╕Ñσí╝Ñδñ╟ñ╧╝⌡ñ▒╝Φñ├ñ┐IRCÑ╫ÑφÑ╚Ñ│Ñδñ≥
  289.   ╩╤╣╣ñ╗ñ║ñ╦ñ╜ñ╬ñ▐ñ▐╩╓ñ╖ñ╞ñññ▐ñ╣íú
  290.  
  291.