Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- # Input sanitation is done by wrapper.
- whois.get "fred" do |hash|
- do something with hash
- end
- # Calling actions from the DB
- class Whois
- # This method is called when the plugin is first loaded
- def initialize( status, config, output, irc, timer )
- @status = status
- @config = config
- @output = output
- @irc = irc
- @timer = timer
- @whois = Hash.new(0)
- end
- # Generic function that can be called by any user
- def get( nick, &block )
- @irc.raw( "whois #{nick}" )
- @callback = block
- end
- def whois( hash )
- @irc.notice( "Xethron", "Whois Recieved" )
- @callback.call hash
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement