Public Member Functions | |
cancel ($string) | |
Cancels all pending operations. | |
commit () | |
Commits (posts) all pending operations. | |
execute ($procedure, $arguments) | |
Generates execution of procedure. | |
filesys ($object) | |
Modifies filesystem object. | |
init () | |
Initialization. | |
log ($string) | |
Generates a log message. | |
put ($priority_class, $raw) | |
Puts raw message to IRC server. | |
put_lines ($priority_class, $prefix, $lines, $allow_empty) | |
Puts raw message(s)/line(s) to IRC server. | |
Public Attributes | |
$commited | |
$lines | |
Holds lines of output. |
Definition at line 526 of file library_php_2.inc.php.
|
Cancels all pending operations.
Definition at line 711 of file library_php_2.inc.php.
|
|
Commits (posts) all pending operations.
Definition at line 722 of file library_php_2.inc.php. 00723 { 00724 if($this->commited) { 00725 echo "Warning: ".__CLASS__."::".__FUNCTION__."() You have already done commit - this can confuse bot!\n"; 00726 } 00727 $this->commited=TRUE; 00728 echo "\n#####\n".$this->lines."#####\n"; // NB: we got \n at the end of $this->lines 00729 $this->lines=""; 00730 }
|
|
Generates execution of procedure.
Definition at line 601 of file library_php_2.inc.php. 00602 { 00603 $x="EXECUTE ".$procedure."("; 00604 $first=TRUE; 00605 foreach($arguments as $e) { 00606 if(!$first) 00607 $x.=","; 00608 $first=FALSE; 00609 $x.="\""; 00610 $x.=addslashes($e); 00611 $x.="\""; 00612 } 00613 $x.=")"; 00614 00615 $this->lines.=$x."\n"; 00616 }
|
|
Modifies filesystem object.
Definition at line 627 of file library_php_2.inc.php. 00628 { 00629 $r="FILESYS InternalName ".$object->internal_name; 00630 $this->lines.=$r."\n"; 00631 00632 $r="FILESYS SET type ".$object->type; 00633 $this->lines.=$r."\n"; 00634 00635 $r="FILESYS SET PublicName ".$object->public_name; 00636 $this->lines.=$r."\n"; 00637 00638 $r="FILESYS SET Time ".$object->time; 00639 $this->lines.=$r."\n"; 00640 00641 $r="FILESYS SET Published ".($object->published?"1":"0"); 00642 $this->lines.=$r."\n"; 00643 00644 $r="FILESYS SET Complete ".($object->complete?"1":"0"); 00645 $this->lines.=$r."\n"; 00646 00647 $r="FILESYS SET Expiration ".$object->expiration; 00648 $this->lines.=$r."\n"; 00649 00650 foreach($object->access as $e) { 00651 // begin of access rights 00652 $r="FILESYS ACCESS_BEGIN"; 00653 $this->lines.=$r."\n"; 00654 00655 $r="FILESYS SET AllUsers ".($e->all_users?"1":"0"); 00656 $this->lines.=$r."\n"; 00657 00658 $r="FILESYS SET UserName ".$e->user_name; 00659 $this->lines.=$r."\n"; 00660 00661 $r="FILESYS SET Owner ".($e->owner?"1":"0"); 00662 $this->lines.=$r."\n"; 00663 00664 $r="FILESYS SET Read ".($e->read?"1":"0"); 00665 $this->lines.=$r."\n"; 00666 00667 $r="FILESYS SET Delete ".($e->delete?"1":"0"); 00668 $this->lines.=$r."\n"; 00669 00670 $r="FILESYS SET NotifyOwner ".($e->notify_owner?"1":"0"); 00671 $this->lines.=$r."\n"; 00672 00673 $r="FILESYS SET NotifyUser ".($e->notify_user?"1":"0"); 00674 $this->lines.=$r."\n"; 00675 00676 $r="FILESYS SET Secure ".($e->secure?"1":"0"); 00677 $this->lines.=$r."\n"; 00678 00679 $r="FILESYS SET AllOnChannel ".$e->all_on_channel; 00680 $this->lines.=$r."\n"; 00681 00682 $r="FILESYS SET AlsoUnknown ".($e->also_unknown?"1":"0"); 00683 $this->lines.=$r."\n"; 00684 00685 // warning: string "hello\nworld\x07!" should be represented as "hello\\nworld\\x07!" 00686 $r="FILESYS SET NotifyOwnerMessage ".$e->notify_owner_message; 00687 $this->lines.=$r."\n"; 00688 00689 // warning: string "hello\nworld\x07!" should be represented as "hello\\nworld\\x07!" 00690 $r="FILESYS SET NotifyUserMessage ".$e->notify_user_message; 00691 $this->lines.=$r."\n"; 00692 00693 // end of access rights 00694 $r="FILESYS ACCESS_END"; 00695 $this->lines.=$r."\n"; 00696 } 00697 00698 // event modifying not supported yet 00699 00700 // commit 00701 $r="FILESYS COMMIT"; 00702 $this->lines.=$r."\n"; 00703 }
|
|
Initialization.
Definition at line 537 of file library_php_2.inc.php.
|
|
Generates a log message.
Definition at line 586 of file library_php_2.inc.php. 00587 { 00588 $x="LOG ".addcslashes($string,"\000..\037\177..\377"); 00589 $this->lines.=$x."\n"; 00590 }
|
|
Puts raw message to IRC server.
Definition at line 551 of file library_php_2.inc.php.
|
|
Puts raw message(s)/line(s) to IRC server.
Definition at line 567 of file library_php_2.inc.php. 00568 { 00569 $lns=explode("\n",$lines); 00570 foreach($lns as $element) { 00571 $str=str_replace("\r","",$element); 00572 if(!$allow_empty && $str=="") 00573 continue; 00574 $x="PUT ".$priority_class." ".$prefix.$str; 00575 $this->lines.=$x."\n"; 00576 } 00577 }
|
|
Definition at line 529 of file library_php_2.inc.php. |
|
Holds lines of output.
Definition at line 527 of file library_php_2.inc.php. |