當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Dog::argv方法代碼示例

本文整理匯總了PHP中Dog::argv方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dog::argv方法的具體用法?PHP Dog::argv怎麽用?PHP Dog::argv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Dog的用法示例。


在下文中一共展示了Dog::argv方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: event_KICK

 /**
  * Rejoin on kick :)
  */
 public function event_KICK()
 {
     $server = Dog::getServer();
     if (Dog::argv(1) === $server->getNick()->getName()) {
         if ($this->getConfig('kickjoin')) {
             $server->joinChannel(Dog::getChannel());
         }
     }
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:12,代碼來源:DOGMOD_AutoJoin.php

示例2:

<?php

# PING :irc.giz.org
Dog::getServer()->sendRAW('PONG ' . Dog::argv(0));
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:4,代碼來源:PING.php

示例3: event_254

 public function event_254()
 {
     $stats = Dog_IRCStats::getOrCreateByServer(Dog::getServer());
     $argv = Dog::argv();
     $stats->saveVars(array('dis_max_chans' => $argv[1]));
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:6,代碼來源:DOGMOD_IRCStats.php

示例4:

<?php

# :irc.giz.org 403 Dog sr :Invalid channel name
Dog_Log::warn('Invalid channel name: ' . Dog::argv(1));
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:4,代碼來源:403.php

示例5:

<?php

# :lindbohm.freenode.net 437 * Dog :Nick/channel is temporarily unavailable
if (Dog::argv(1) === Dog::getNickname()) {
    include '433.php';
    # Nickname in use.
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:7,代碼來源:437.php

示例6: event_330

 public function event_330()
 {
     if (false !== ($user = Dog::getUserByArg(Dog::argv(1)))) {
         $this->onAutoLogin($user);
     }
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:6,代碼來源:DOGMOD_AutoLogin.php

示例7: foreach

# :Dog!gizmore@localhost NICK gizmore
$old_user = Dog::setupUser();
$serv = Dog::getServer();
if (false === ($new_user = Dog::getOrCreateUserByName(Dog::argv(0)))) {
    Dog::suppressModules();
    return Dog_Log::critical('Cannot create user!');
}
# Copy channels with privs
if ($old_user) {
    $old_uid = $old_user->getID();
    $serv->addUser($new_user);
    foreach ($serv->getChannels() as $channel) {
        $channel instanceof Dog_Channel;
        if (false !== $channel->getUserByID($old_uid)) {
            $channel->addUser($new_user, $channel->getPriv($old_user));
        }
    }
    $serv->removeUser($old_user);
    echo "OLD DOG: {$old_user->getName()}\n";
    echo "OLD DOG: " . Dog::getNickname() . "\n";
    if ($old_user->getName() === Dog::getNickname()) {
        if (false !== ($nick = Dog_Nick::getExistingNick($serv, Dog::argv(0)))) {
            $serv->setNick($nick);
            $serv->setNicknum(0);
            $nick->identify();
        } else {
            $serv->setNickName(Dog::argv(0));
        }
    }
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:30,代碼來源:NICK.php

示例8: array

<?php

# :irc.giz.org 001 Dog :Welcome to the gizmore IRC Network Dog!Dawg@localhost
# Set bot mode
$server = Dog::getServer();
$nick = Dog::getNickname();
Dog::getOrCreateUserByName(Dog::argv(0));
if (!$server->isOptionEnabled(Dog_Server::NO_BOTFLAG)) {
    $server->sendRAW("MODE {$nick} +b");
    $server->sendRAW("MODE {$nick} +B");
}
if (false !== ($connector = $server->getVarDefault('dog_connector', false))) {
    $server->unsetVar('dog_connector');
    $connector instanceof Dog_User;
    $connector->sendPRIVMSG(Dog::lang('msg_connected', array($server->displayLongName(), Dog::getNickname(), $server->getConf('ircoppass'))));
}
$server->saveOption(Dog_Server::HAS_CONNECTED_ONCE);
$server->getNick()->identify();
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:18,代碼來源:001.php

示例9:

<?php

# :gizmore!gizmore@localhost KICK #sr Dog :gizmore
Dog::setupUser();
$server = Dog::getServer();
$channel = Dog::setupChannel();
if (false !== ($user = Dog::getOrLoadUserByArg(Dog::argv(1)))) {
    $channel->removeUser($user);
}
if (Dog::getNickname() === $user->getName()) {
    $server->removeChannel($channel);
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:12,代碼來源:KICK.php

示例10: event_QUIT

 public function event_QUIT()
 {
     if (false !== ($user = Dog::getUser())) {
         Shadowrun4::onQuit(Dog::getServer(), Dog::getUser(), Dog::argv(0));
     }
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:6,代碼來源:DOGMOD_Shadowlamb.php


注:本文中的Dog::argv方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。