以下の内容はhttps://chulip.org/entry/20090727/1248652886より取得しました。


WikipediaのURLを返すSkypebot

ひとまず作ってみたけどあまりよろしくないいろいろな意味で

require 'rubygems'
require 'skypeapi'
require 'uri'

SkypeAPI.init
SkypeAPI.attachWait

def Chatless(chatmessage)
  active_chat = SkypeAPI.searchActiveChats

  #w:ではじめるとwikipediaのURLを吐き出す(日本語は変換する)
  if chatmessage.getBody =~ /^w:/
    word = chatmessage.getBody[2,chatmessage.getBody.size]
    SkypeAPI::ChatMessage.create(active_chat, URI.escape("http://ja.wikipedia.org/wiki/#{word}"))
  end
end

SkypeAPI::ChatMessage.setNotify :Status, 'RECEIVED' do |chatmessage|
  Chatless(chatmessage)
end

SkypeAPI::ChatMessage.setNotify :Status, 'SENT' do |chatmessage|
  Chatless(chatmessage)
end

loop do
  SkypeAPI.polling
  sleep 0.123
end



以上の内容はhttps://chulip.org/entry/20090727/1248652886より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14