Konversation/Scripts/Ghosttrick/da: Difference between revisions
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 26: | Line 26: | ||
# now identify yourself at the server | # now identify yourself at the server | ||
dcop $PORT default raw $SERVER "PRIVMSG nickserv :IDENTIFY $pass" | dcop $PORT default raw $SERVER "PRIVMSG nickserv :IDENTIFY $pass" | ||
</syntaxhighlight> | </syntaxhighlight>}}<!--{{--> | ||
; As KDE 4 has changed to dbus instead of dcop use this version for KDE 4: | ; As KDE 4 has changed to dbus instead of dcop use this version for KDE 4: |
Revision as of 21:08, 4 August 2011
Et netværks indstillinger indeholder et "Commands"-felt, som kan bruges til at køre inputlinjekommandoer ved opkobling til dette netværk. I dette felt kan man bruge en speciel variabel, "%nick", som erstattes med det aktuelle kendenavn. Dette kan kombineres med kommandoen /exec til at køre et eksternt script, som undersøger om kendenavnet er det ønskede nick, og hvis ikke, bruge Konversations DCOP IPC-interface til at sende kommandoen ghost til nickserv.
Du kan således lægge noget lignende dette i din lokale scripts-mappe (~/.kde/share/apps/konversation/scripts) under navnet "getnickback" og markere det som kørbart:
- For KDE 3.5 brugere kan dette bruges
#!/bin/sh nick=******** # your desired nickanme pass=******** # the according password # don't edit below # PORT=$1 SERVER=$2 NICK=$4 # if your current assigned nick isn't the same as your desired one, ghost yourself and change nick if [ "$NICK" != "$nick" ] then dcop $PORT default raw $SERVER "PRIVMSG nickserv :GHOST $nick $pass" dcop $PORT default raw $SERVER "/nick $nick" fi # now identify yourself at the server dcop $PORT default raw $SERVER "PRIVMSG nickserv :IDENTIFY $pass"
- As KDE 4 has changed to dbus instead of dcop use this version for KDE 4
#!/bin/sh nick=******** # your desired nickanme pass=******** # the according password # don't edit below # CONNECTION=$1 NICK=$3 # if your current assigned nick isn't the same as your desired one, ghost yourself and change nick if [ "$NICK" != "$nick" ] then qdbus org.kde.konversation /irc raw $CONNECTION "PRIVMSG nickserv :GHOST $nick $pass" qdbus org.kde.konversation /irc raw $CONNECTION "NICK $nick" fi # now identify yourself at the server qdbus org.kde.konversation /irc raw $CONNECTION "PRIVMSG nickserv :IDENTIFY $pass"
Notice the nick and password settings you need to fill in as you need them to be. Then, into the network's "Commands" field put /exec getnickback %nick