All pastes #162516 Raw Edit

Stuff

public php v1 · immutable
·published 2006-09-06 16:35 UTC
rendered paste body
case MODE:					$this->mode = $this->raw[3];					$this->channel[] = $this->raw[2];					$usersIn = helpers::toArray($this->raw[3]);					$modeIn = array_shift($usersIn);                    //**???? this is not completed as I cant figure otu whats happening yet                    // ** the info needs to be $channels->setMode($hcan, $user, $mode) ?? maybe                    echo "MODE > and users\n\n\n";					for($i = 0; $i < strlen($modeIn); $i++)					{						$chr = substr($modeIn, $i, 1);						if($chr == '+')						{							for($j = $i + 1; $j < strlen($modeIn)  && $chr != '-' ;$j++)			                {								$chr = substr($modeIn, $j, 1);								if($chr == 'v'){									$info->channels[$this->channel[0]][array_shift($usersIn)] .= '+';                                }elseif($chr == 'o'){									$info->channels[$this->channel[0]][array_shift($usersIn)]  .= '@';                                }							}						}						elseif($chr == '-')						{							for($j = $i + 1; $j < strlen($modeIn)  && $chr != '+' ;$j++)			                {								$chr = substr($modeIn, $j, 1);								if($chr == 'v'){									$user = array_shift($usersIn);									$info->channels[$this->channel[0]][$user] = str_replace('+', '', $info->channels[$this->channel[0]][$user]);								}elseif($chr == 'o'){									$user = array_shift($usersIn);									$info->channels[$this->channel[0]][$user] = str_replace('@', '', $info->channels[$this->channel[0]][$user]);								}							}						}					}					break;