Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made g:vimchat_accounts optional.

git-svn-id: http://vimchat.googlecode.com/svn/trunk@141 d1d492a2-f496-11dd-9d1d-173cc1d06e3c
  • Loading branch information...
commit f89f870135e57bd6c5f8ecd3c07782bc8e41746e 1 parent f8b0b5a
naveedm9 authored
Showing with 12 additions and 20 deletions.
  1. +6 −4 config
  2. +6 −16 plugin/vimchat.vim
View
10 config
@@ -2,10 +2,12 @@
# edit and write this file and vimchat will update itself on the fly.
#
# Accounts entries are in the form: username@server/resource = password.
-# The /resource and password are optional. If you leave the password blank,
-# vimchat will prompt you for it when you connect. This accounts will be
-# connected to automatically when vimchat starts. You may connect or
-# disconnect from a particular account with \on and \off.
+# The '/resource' part of the account is optional. It is a jabber feature that
+# lets you associate physical locations with your accounts. The password is
+# optional as well. If you leave the password blank, vimchat will prompt you
+# for it when you connect. These accounts will be connected to automatically
+# when vimchat starts. You may connect or disconnect from a particular account
+# with \on and \off.
[accounts]
#bob@gmail.com =
View
22 plugin/vimchat.vim
@@ -18,12 +18,11 @@
"
" Supported ~/.vimrc Variables:
" g:vimchat_accounts = {'jabber id':'password',...}
-"
" g:vimchat_buddylistwidth = width of buddy list
" g:vimchat_libnotify = (0 or 1) default is 1
" g:vimchat_logpath = path to store log files
" g:vimchat_logchats = (0 or 1) default is 1
-" g:vimchat_otr = (0 or 1) default is 1
+" g:vimchat_otr = (0 or 1) default is 0
" g:vimchat_logotr = (0 or 1) default is 1
" g:vimchat_statusicon = (0 or 1) default is 1
@@ -136,12 +135,10 @@ class VimChatScope:
self.statusIcon.start()
# Signon to accounts listed in .vimrc
- vimChatAccounts = vim.eval('g:vimchat_accounts')
- for jid,password in vimChatAccounts.items():
- pass
- if password == '':
- password = vim.eval('inputsecret("' + jid + ' password: ")')
- self._signOn(jid,password)
+ if vim.eval("exists('g:vimchat_accounts')") == '1':
+ vimChatAccounts = vim.eval('g:vimchat_accounts')
+ for jid,password in vimChatAccounts.items():
+ self._signOn(jid,password)
# Signon to accounts listed in .vimchat/config
if os.path.exists(self.configFilePath):
@@ -150,9 +147,6 @@ class VimChatScope:
if config.has_section('accounts'):
for jid in config.options('accounts'):
password = config.get('accounts', jid)
- if not password:
- password = vim.eval(
- 'inputsecret("' + jid + ' password: ")')
self._signOn(jid, password)
#}}}
@@ -1637,10 +1631,6 @@ set switchbuf=usetab
"}}}
"{{{ VimChatCheckVars
fu! VimChatCheckVars()
- if !exists('g:vimchat_accounts')
- echo "Must set g:vimchat_accounts in ~/.vimrc!"
- return 0
- endif
if !exists('g:vimchat_buddylistwidth')
let g:vimchat_buddylistwidth=30
endif
@@ -1654,7 +1644,7 @@ fu! VimChatCheckVars()
let g:vimchat_logchats=1
endif
if !exists('g:vimchat_otr')
- let g:vimchat_otr=1
+ let g:vimchat_otr=0
endif
if !exists('g:vimchat_logotr')
let g:vimchat_logotr=1
Please sign in to comment.
Something went wrong with that request. Please try again.