Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Paste Description for factoids module

need to finish add factoid with more-than-one word and tell cmd

factoids module
Friday, April 25th, 2008 at 7:48:51am MDT 

  1. if(command('factoids',3)){
  2.                 if($cmdparamsarray[0] == 'list'){
  3.                         $factsout = $factoids;
  4.                         foreach($factsout as $key => $number){
  5.                                 $factsout[$key] = $key.' ('.$number.')';
  6.                         }
  7.                         SendCommand("PRIVMSG $sender :".implode(' || ',$factsout));
  8.                 } elseif($cmdparamsarray[0] == 'add'){
  9.                         if($cmdparamsarray[1] != '' && $cmdparamsarray[2] != ''){
  10.                                 $factoids[$cmdparamsarray[1]] = implode(' ',array_slice($cmdparamsarray,2));
  11.                                 SendCommand("PRIVMSG $sender :adding $cmdparamsarray[1] (".$cmdparamsarray[2].") ");
  12.                         }
  13.                 } elseif($cmdparamsarray[0] == 'del'){
  14.                         if($cmdparamsarray[1] != ''){
  15.                                 unset($factoids[$cmdparamsarray[1]]);
  16.                                 SendCommand("PRIVMSG $sender :deleting $cmdparamsarray[1]");
  17.                         }
  18.                 } elseif($cmdparamsarray[0] == 'save'){
  19.                         file_put_contents($dir.'facts.dat',serialize($factoids));
  20.                         sendcommand("PRIVMSG $sender :factoids saved!");
  21.                        
  22.  
  23.                 } elseif($cmdparamsarray[0] == 'load'){
  24.                         $factoids = unserialize(file_get_contents($dir.'facts.dat'));
  25.                         SendCommand("PRIVMSG $sender :Factoids file list loaded!");
  26.  
  27.                 } elseif($cmdparamsarray[0] == 'tell'){
  28.                         SendCommand("PRIVMSG $cmdparamsarray[1] :$cmdparamsarray[2] is ----NEED TO FINISH THIS-----");
  29.  
  30.                 } else {
  31.                         SendCommand("PRIVMSG $sender :Usage: ".$comchar.'factoids [list], [add <factoid> <deff> (more words per one factoid is bugged)] , [del <fact>], [save], [load], [tell] - neeed to finish this option');
  32.                 }
  33. }

Paste Details

Tags: php

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
worth-right fantasy-obligation fantasy-obligation