AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

is OP or not

Ein Thema von GilbertCD · begonnen am 27. Dez 2005 · letzter Beitrag vom 28. Dez 2005
Antwort Antwort
GilbertCD

Registriert seit: 27. Dez 2005
3 Beiträge
 
#1

is OP or not

  Alt 27. Dez 2005, 14:48
How to know if one Nick from IRC is @(OP) or not. This procedure:

Delphi-Quellcode:
{ Return True if the string Nick is a channel operator. }
function TIdIRC.IsOp(ANick: String): Boolean;
begin
  Result := (Length(Nick)>0) and (Nick[1] = '@'); {Do not Localize}
end;
is not work, be cause i`m not obtain this char '@' from AUser.Nick. Sorry for me english.
  Mit Zitat antworten Zitat
Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#2

Re: is OP or not

  Alt 27. Dez 2005, 15:24
Code:
[color=green]{ Return True if the string Nick is a channel operator. }[/color]
[b][color=darkblue]function[/color][/b] TIdIRC.IsOp([b]A[/b]Nick: [b][color=darkblue]String[/color][/b]): Boolean;
[b][color=darkblue]begin[/color][/b]
  Result := (Length([b][color=#ff0000]A[/color][/b]Nick)>0) [b]and[/b] ([b][color=#ff0000]A[/color][/b]Nick[1] = '[color=blue]@[/color]');
[b][color=darkblue]end[/color];[/b]
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat
GilbertCD

Registriert seit: 27. Dez 2005
3 Beiträge
 
#3

Re: is OP or not

  Alt 27. Dez 2005, 15:30
Yes, thanks.But.. no..This function is work only if input text is: "@xxxxxx" but this '@' ? From where ? AUser.Nick ..return only nick..

(Indy9 ..Delphi7 Eneterprise.)
  Mit Zitat antworten Zitat
Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#4

Re: is OP or not

  Alt 27. Dez 2005, 15:59
I don't think this '@' will ever be present. It is only prepended to the nick by IRC clients to show the user the OP status of someone. I haven't got Indies installed right now, but there should be something explicit somewhere. ( Something like User.Status )

But I wonder why the method you showed is a member of TIdIRC... Was it there before or did you add it? Is it a callback function? I can't figure this out from here....
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat
GilbertCD

Registriert seit: 27. Dez 2005
3 Beiträge
 
#5

Re: is OP or not

  Alt 28. Dez 2005, 14:22
I`m still waitting.
  Mit Zitat antworten Zitat
Daniel G
(Gast)

n/a Beiträge
 
#6

Re: is OP or not

  Alt 28. Dez 2005, 21:57
Zitat von GilbertCD:
I`m still waitting.
For what? For christmas? Sorry, it's already over.

DGL-Luke already told you (or better wrote) that he needs more info...
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:33 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz