2012-05-13 3 views
0

누구나 PircBots에서 이것을 사용하는 방법을 알고 있습니까? http://www.jibble.org/javadocs/pircbot/index.html 사용자 호스트 이름을 가져와 금지해야합니다. 읽어 주셔서 감사합니다!PircBot 호스트 이름을 얻는 방법

   if (cmd.equalsIgnoreCase("ban")) { 
         if (command[1] != null && command[2] != null) { 
          //Command[1] is the users name. 
          //Command[2] is the reason. 
          //how do i make this ban someone? 
         } 
        } 
+0

Iv는 호스트 이름을 확인하는 방법을 모르겠습니다. @ 짐 가리슨 –

답변

0

당신은 단지 이유 킥, 이유와 차단할 수 없습니다. 이 경우 나는 당신이 kban을 원한다고 가정합니다, 그것은 kick + ban입니다. 명령이 호스트 마스크는 알려 지진 않았지만이 필요한 경우

  if (cmd.equalsIgnoreCase("ban")) { 
        if (command[1] != null && command[2] != null) { 
         //Command[1] is the users name. 
         //Command[2] is the reason. 
         //how do i make this ban someone? 

         // ban first 
         //make sure to input the current channel in "currentChannel" 
         ban(currentChannel, command[1]+"!*@*"); 

         // kick with a reason 
         kick(currentChannel, command[1], command[2]); 
        } 
       } 

, 당신은 사용자가를 지정하도록해야 - 그는 특정 금지, 전체 범위 등 그밖에 어쩌면 금지 할 수 있습니다, 가난한 별명 금지를 생성 (사용자가있는 경우 다른 사람은 "후이즈"를 사용한다, 당신은 "whowas는"발견하는 데 사용할 수있는 오프라인 "whowas"작동하지 않을 수 있습니다)

을 PircBot의 JavaDoc을에서 -.. http://www.jibble.org/javadocs/pircbot/index.html

금지 (문자열 채널, 문자열 호스트 마스크) 채널에서 사용자를 금지합니다.

kick (문자열 채널, 문자열 닉) 채널에서 사용자를 시작합니다.

kick (문자열 채널, 문자열 닉, 문자열 이유) 채널에서 사용자를 걷어 내고 이유를 설명합니다.

관련 문제